|
LLVM
4.0.0
|
Global mapping layer. More...
#include <GlobalMappingLayer.h>
Public Types | |
| typedef BaseLayerT::ModuleSetHandleT | ModuleSetHandleT |
| Handle to a set of added modules. More... | |
Public Member Functions | |
| GlobalMappingLayer (BaseLayerT &BaseLayer) | |
| Construct an GlobalMappingLayer with the given BaseLayer. More... | |
| template<typename ModuleSetT , typename MemoryManagerPtrT , typename SymbolResolverPtrT > | |
| ModuleSetHandleT | addModuleSet (ModuleSetT Ms, MemoryManagerPtrT MemMgr, SymbolResolverPtrT Resolver) |
| Add the given module set to the JIT. More... | |
| void | removeModuleSet (ModuleSetHandleT H) |
| Remove the module set associated with the handle H. More... | |
| void | setGlobalMapping (const std::string &Name, JITTargetAddress Addr) |
| Manually set the address to return for the given symbol. More... | |
| void | eraseGlobalMapping (const std::string &Name) |
| Remove the given symbol from the global mapping. More... | |
| JITSymbol | findSymbol (const std::string &Name, bool ExportedSymbolsOnly) |
| Search for the given named symbol. More... | |
| JITSymbol | findSymbolIn (ModuleSetHandleT H, const std::string &Name, bool ExportedSymbolsOnly) |
| Get the address of the given symbol in the context of the set of modules represented by the handle H. More... | |
| void | emitAndFinalize (ModuleSetHandleT H) |
| Immediately emit and finalize the module set represented by the given handle. More... | |
Global mapping layer.
This layer overrides the findSymbol method to first search a local symbol table that the client can define. It can be used to inject new symbol mappings into the JIT. Beware, however: symbols within a single IR module or object file will still resolve locally (via RuntimeDyld's symbol table) - such internal references cannot be overriden via this layer.
Definition at line 32 of file GlobalMappingLayer.h.
| typedef BaseLayerT::ModuleSetHandleT llvm::orc::GlobalMappingLayer< BaseLayerT >::ModuleSetHandleT |
Handle to a set of added modules.
Definition at line 35 of file GlobalMappingLayer.h.
|
inline |
Construct an GlobalMappingLayer with the given BaseLayer.
Definition at line 38 of file GlobalMappingLayer.h.
|
inline |
Add the given module set to the JIT.
Definition at line 44 of file GlobalMappingLayer.h.
|
inline |
Immediately emit and finalize the module set represented by the given handle.
| H | Handle for module set to emit/finalize. |
Definition at line 96 of file GlobalMappingLayer.h.
|
inline |
Remove the given symbol from the global mapping.
Definition at line 60 of file GlobalMappingLayer.h.
|
inline |
Search for the given named symbol.
This method will first search the local symbol table, returning any symbol found there. If the symbol is not found in the local table then this call will be passed through to the base layer.
| Name | The name of the symbol to search for. |
| ExportedSymbolsOnly | If true, search only for exported symbols. |
Definition at line 73 of file GlobalMappingLayer.h.
References llvm::JITSymbolFlags::Exported, and I.
|
inline |
Get the address of the given symbol in the context of the set of modules represented by the handle H.
This call is forwarded to the base layer's implementation.
| H | The handle for the module set to search in. |
| Name | The name of the symbol to search for. |
| ExportedSymbolsOnly | If true, search only for exported symbols. |
Definition at line 88 of file GlobalMappingLayer.h.
|
inline |
Remove the module set associated with the handle H.
Definition at line 52 of file GlobalMappingLayer.h.
|
inline |
Manually set the address to return for the given symbol.
Definition at line 55 of file GlobalMappingLayer.h.
1.8.6