LLVM: llvm::jitlink::JITLinkContext Class Reference (original) (raw)
Holds context for a single jitLink invocation. More...
#include "[llvm/ExecutionEngine/JITLink/JITLink.h](JITLink%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| JITLinkContext (const JITLinkDylib *JD) | |
| Create a JITLinkContext. | |
| virtual | ~JITLinkContext () |
| Destroy a JITLinkContext. | |
| const JITLinkDylib * | getJITLinkDylib () const |
| Return the JITLinkDylib that this link is targeting, if any. | |
| virtual JITLinkMemoryManager & | getMemoryManager ()=0 |
| Return the MemoryManager to be used for this link. | |
| virtual void | notifyFailed (Error Err)=0 |
| Notify this context that linking failed. | |
| virtual void | lookup (const LookupMap &Symbols, std::unique_ptr< JITLinkAsyncLookupContinuation > LC)=0 |
| Called by JITLink to resolve external symbols. | |
| virtual Error | notifyResolved (LinkGraph &G)=0 |
| Called by JITLink once all defined symbols in the graph have been assigned their final memory locations in the target process. | |
| virtual void | notifyFinalized (JITLinkMemoryManager::FinalizedAlloc Alloc)=0 |
| Called by JITLink to notify the context that the object has been finalized (i.e. | |
| virtual bool | shouldAddDefaultTargetPasses (const Triple &TT) const |
| Called by JITLink prior to linking to determine whether default passes for the target should be added. | |
| virtual LinkGraphPassFunction | getMarkLivePass (const Triple &TT) const |
| Returns the mark-live pass to be used for this link. | |
| virtual Error | modifyPassConfig (LinkGraph &G, PassConfiguration &Config) |
| Called by JITLink to modify the pass pipeline prior to linking. |
Holds context for a single jitLink invocation.
Definition at line 1933 of file JITLink.h.
◆ LookupMap
◆ ~JITLinkContext()
| llvm::jitlink::JITLinkContext::~JITLinkContext ( ) | virtualdefault |
|---|
◆ getJITLinkDylib()
◆ getMarkLivePass()
Returns the mark-live pass to be used for this link.
If no pass is returned (the default) then the target-specific linker implementation will choose a conservative default (usually marking all symbols live). This function is only called if shouldAddDefaultTargetPasses returns true, otherwise the JITContext is responsible for adding a mark-live pass in modifyPassConfig.
Reimplemented in llvm::orc::LinkGraphLinkingLayer::JITLinkCtx.
Definition at line 406 of file JITLink.cpp.
References getMarkLivePass().
Referenced by getMarkLivePass(), and notifyFinalized().
◆ getMemoryManager()
◆ lookup()
◆ modifyPassConfig()
◆ notifyFailed()
| virtual void llvm::jitlink::JITLinkContext::notifyFailed ( Error Err) | pure virtual |
|---|
◆ notifyFinalized()
◆ notifyResolved()
| virtual Error llvm::jitlink::JITLinkContext::notifyResolved ( LinkGraph & G) | pure virtual |
|---|
Called by JITLink once all defined symbols in the graph have been assigned their final memory locations in the target process.
At this point the LinkGraph can be inspected to build a symbol table, however the block content will not generally have been copied to the target location yet.
If the client detects an error in the LinkGraph state (e.g. unexpected or missing symbols) they may return an error here. The error will be propagated to notifyFailed and the linker will bail out.
Implemented in llvm::orc::LinkGraphLinkingLayer::JITLinkCtx.
References G.
◆ shouldAddDefaultTargetPasses()
| bool llvm::jitlink::JITLinkContext::shouldAddDefaultTargetPasses ( const Triple & TT) const | virtual |
|---|
Called by JITLink prior to linking to determine whether default passes for the target should be added.
The default implementation returns true. If subclasses override this method to return false for any target then they are required to fully configure the pass pipeline for that target.
Definition at line 402 of file JITLink.cpp.
References shouldAddDefaultTargetPasses().
Referenced by notifyFinalized(), and shouldAddDefaultTargetPasses().
The documentation for this class was generated from the following files:
- include/llvm/ExecutionEngine/JITLink/JITLink.h
- lib/ExecutionEngine/JITLink/JITLink.cpp