Add support for name mangling.
[oota-llvm.git] / include / llvm / Support / Linker.h
1 //===- llvm/Transforms/Linker.h - Module Linker Interface --------*- C++ -*--=//
2 //
3 // This file defines the interface to the module linker.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef LLVM_TRANSFORMATIONS_LINKER_H
8 #define LLVM_TRANSFORMATIONS_LINKER_H
9
10 #include <string>
11 class Module;
12 class Type;
13 class Value;
14
15
16 // LinkModules - This function links two modules together, with the resulting
17 // left module modified to be the composite of the two input modules.  If an
18 // error occurs, true is returned and ErrorMsg (if not null) is set to indicate
19 // the problem.
20 //
21 bool    LinkModules(Module *Dest, const Module *Src, string *ErrorMsg = 0);
22
23
24 // MangleTypeName - Implement a consistent name-mangling scheme for
25 //                  a given type.
26 // 
27 string  MangleTypeName(const Type* type);
28
29
30 // MangleName - implement a consistent name-mangling scheme for all
31 // externally visible (i.e., global) objects.
32 // privateName should be unique within the module.
33 // 
34 string  MangleName(const string& privateName, const Value* V);
35
36
37 #endif