|
LLVM
3.7.0
|
This class provides the core functionality of linking in LLVM. More...
#include <Linker.h>
Classes | |
| struct | IdentifiedStructTypeSet |
| struct | StructTypeKeyInfo |
Public Types | |
| typedef DenseSet< StructType *, StructTypeKeyInfo > | NonOpaqueStructTypeSet |
| typedef DenseSet< StructType * > | OpaqueStructTypeSet |
Public Member Functions | |
| Linker (Module *M, DiagnosticHandlerFunction DiagnosticHandler) | |
| Linker (Module *M) | |
| ~Linker () | |
| Module * | getModule () const |
| void | deleteModule () |
| bool | linkInModule (Module *Src, bool OverrideSymbols=false) |
Link Src into the composite. More... | |
| void | setModule (Module *Dst) |
| Set the composite to the passed-in module. More... | |
Static Public Member Functions | |
| static bool | LinkModules (Module *Dest, Module *Src, DiagnosticHandlerFunction DiagnosticHandler) |
| This function links two modules together, with the resulting Dest module modified to be the composite of the two input modules. More... | |
| static bool | LinkModules (Module *Dest, Module *Src) |
This class provides the core functionality of linking in LLVM.
It keeps a pointer to the merged module so far. It doesn't take ownership of the module since it is assumed that the user of this class will want to do something with it after the linking.
Definition at line 27 of file Linker/Linker.h.
Definition at line 46 of file Linker/Linker.h.
| typedef DenseSet<StructType *> llvm::Linker::OpaqueStructTypeSet |
Definition at line 47 of file Linker/Linker.h.
| Linker::Linker | ( | Module * | M, |
| DiagnosticHandlerFunction | DiagnosticHandler | ||
| ) |
Definition at line 1744 of file LinkModules.cpp.
| Linker::Linker | ( | Module * | M | ) |
Definition at line 1748 of file LinkModules.cpp.
References llvm::LLVMContext::diagnose(), and llvm::Module::getContext().
| Linker::~Linker | ( | ) |
Definition at line 1754 of file LinkModules.cpp.
| void Linker::deleteModule | ( | ) |
Definition at line 1757 of file LinkModules.cpp.
|
inline |
Definition at line 67 of file Linker/Linker.h.
Referenced by llvm::LTOCodeGenerator::optimize(), and llvm::LTOCodeGenerator::writeMergedModules().
Link Src into the composite.
The source is destroyed. Passing OverrideSymbols as true will have symbols from Src shadow those in the Dest. Returns true on error.
Definition at line 1762 of file LinkModules.cpp.
Referenced by llvm::LTOCodeGenerator::addModule(), and LinkModules().
|
static |
This function links two modules together, with the resulting Dest module modified to be the composite of the two input modules.
If an error occurs, true is returned and ErrorMsg (if not null) is set to indicate the problem. Upon failure, the Dest module could be in a modified state, and shouldn't be relied on to be consistent.
Definition at line 1783 of file LinkModules.cpp.
References linkInModule().
Referenced by LLVMLinkModules().
Definition at line 1789 of file LinkModules.cpp.
References linkInModule().
| void Linker::setModule | ( | Module * | Dst | ) |
Set the composite to the passed-in module.
Definition at line 1770 of file LinkModules.cpp.
Referenced by llvm::LTOCodeGenerator::setModule().
1.8.6