LLVM
8.0.1
|
Global mapping layer. More...
#include "llvm/ExecutionEngine/Orc/GlobalMappingLayer.h"
Public Types | |
using | ModuleHandleT = typename BaseLayerT::ModuleHandleT |
Handle to an added module. More... | |
Public Member Functions | |
GlobalMappingLayer (BaseLayerT &BaseLayer) | |
Construct an GlobalMappingLayer with the given BaseLayer. More... | |
Expected< ModuleHandleT > | addModule (std::shared_ptr< Module > M, std::shared_ptr< JITSymbolResolver > Resolver) |
Add the given module to the JIT. More... | |
Error | removeModule (ModuleHandleT 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 (ModuleHandleT H, const std::string &Name, bool ExportedSymbolsOnly) |
Get the address of the given symbol in the context of the of the module represented by the handle H. More... | |
Error | emitAndFinalize (ModuleHandleT 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 38 of file GlobalMappingLayer.h.
using llvm::orc::GlobalMappingLayer< BaseLayerT >::ModuleHandleT = typename BaseLayerT::ModuleHandleT |
Handle to an added module.
Definition at line 42 of file GlobalMappingLayer.h.
|
inline |
Construct an GlobalMappingLayer with the given BaseLayer.
Definition at line 45 of file GlobalMappingLayer.h.
|
inline |
Add the given module to the JIT.
Definition at line 50 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 100 of file GlobalMappingLayer.h.
|
inline |
Remove the given symbol from the global mapping.
Definition at line 64 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 77 of file GlobalMappingLayer.h.
References llvm::JITSymbolFlags::Exported, and I.
|
inline |
Get the address of the given symbol in the context of the of the module represented by the handle H.
This call is forwarded to the base layer's implementation.
H | The handle for the module to search in. |
Name | The name of the symbol to search for. |
ExportedSymbolsOnly | If true, search only for exported symbols. |
Definition at line 92 of file GlobalMappingLayer.h.
|
inline |
Remove the module set associated with the handle H.
Definition at line 56 of file GlobalMappingLayer.h.
|
inline |
Manually set the address to return for the given symbol.
Definition at line 59 of file GlobalMappingLayer.h.
References Name.