f40cce3dcd122f15b755b324af1087928e416609
[oota-llvm.git] / include / llvm / Transforms / Utils / Linker.h
1 //===- llvm/Transforms/Utils/Linker.h - Module Linker Interface -*- C++ -*-===//
2 //
3 // This file defines the interface to the module linker.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef LLVM_TRANSFORMATIONS_UTILS_LINKER_H
8 #define LLVM_TRANSFORMATIONS_UTILS_LINKER_H
9
10 #include <string>
11 class Module;
12
13 // LinkModules - This function links two modules together, with the resulting
14 // left module modified to be the composite of the two input modules.  If an
15 // error occurs, true is returned and ErrorMsg (if not null) is set to indicate
16 // the problem.
17 //
18 bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg = 0);
19
20 #endif
21