LLVM
15.0.0git
|
Public Member Functions | |
ObjectLinkingLayerJITLinkContext (ObjectLinkingLayer &Layer, std::unique_ptr< MaterializationResponsibility > MR, std::unique_ptr< MemoryBuffer > ObjBuffer) | |
~ObjectLinkingLayerJITLinkContext () | |
JITLinkMemoryManager & | getMemoryManager () override |
Return the MemoryManager to be used for this link. More... | |
void | notifyMaterializing (LinkGraph &G) |
void | notifyFailed (Error Err) override |
Notify this context that linking failed. More... | |
void | lookup (const LookupMap &Symbols, std::unique_ptr< JITLinkAsyncLookupContinuation > LC) override |
Called by JITLink to resolve external symbols. More... | |
Error | notifyResolved (LinkGraph &G) override |
Called by JITLink once all defined symbols in the graph have been assigned their final memory locations in the target process. More... | |
void | notifyFinalized (JITLinkMemoryManager::FinalizedAlloc A) override |
Called by JITLink to notify the context that the object has been finalized (i.e. More... | |
LinkGraphPassFunction | getMarkLivePass (const Triple &TT) const override |
Returns the mark-live pass to be used for this link. More... | |
Error | modifyPassConfig (LinkGraph &LG, PassConfiguration &Config) override |
Called by JITLink to modify the pass pipeline prior to linking. More... | |
![]() | |
JITLinkContext (const JITLinkDylib *JD) | |
Create a JITLinkContext. More... | |
virtual | ~JITLinkContext () |
Destroy a JITLinkContext. More... | |
const JITLinkDylib * | getJITLinkDylib () const |
Return the JITLinkDylib that this link is targeting, if any. More... | |
virtual bool | shouldAddDefaultTargetPasses (const Triple &TT) const |
Called by JITLink prior to linking to determine whether default passes for the target should be added. More... | |
Additional Inherited Members | |
![]() | |
using | LookupMap = DenseMap< StringRef, SymbolLookupFlags > |
Definition at line 121 of file ObjectLinkingLayer.cpp.
|
inline |
Definition at line 123 of file ObjectLinkingLayer.cpp.
|
inline |
Definition at line 130 of file ObjectLinkingLayer.cpp.
References move.
|
inlineoverridevirtual |
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 from llvm::jitlink::JITLinkContext.
Definition at line 320 of file ObjectLinkingLayer.cpp.
References G.
|
inlineoverridevirtual |
Return the MemoryManager to be used for this link.
Implements llvm::jitlink::JITLinkContext.
Definition at line 137 of file ObjectLinkingLayer.cpp.
|
inlineoverridevirtual |
Called by JITLink to resolve external symbols.
This method is passed a lookup continutation which it must call with a result to continue the linking process.
Implements llvm::jitlink::JITLinkContext.
Definition at line 153 of file ObjectLinkingLayer.cpp.
References llvm::orc::SymbolLookupSet::add(), llvm::AArch64CC::LO, move, llvm::orc::RequiredSymbol, llvm::jitlink::RequiredSymbol, llvm::Reloc::Static, llvm::orc::WeaklyReferencedSymbol, and llvm::jitlink::WeaklyReferencedSymbol.
|
inlineoverridevirtual |
Called by JITLink to modify the pass pipeline prior to linking.
The default version performs no modification.
Reimplemented from llvm::jitlink::JITLinkContext.
Definition at line 324 of file ObjectLinkingLayer.cpp.
References G, llvm::jitlink::PassConfiguration::PostPrunePasses, llvm::jitlink::PassConfiguration::PrePrunePasses, and llvm::Error::success().
|
inlineoverridevirtual |
Notify this context that linking failed.
Called by JITLink if linking cannot be completed.
Implements llvm::jitlink::JITLinkContext.
Definition at line 146 of file ObjectLinkingLayer.cpp.
|
inlineoverridevirtual |
Called by JITLink to notify the context that the object has been finalized (i.e.
emitted to memory and memory permissions set). If all of this objects dependencies have also been finalized then the code is ready to run.
Implements llvm::jitlink::JITLinkContext.
Definition at line 308 of file ObjectLinkingLayer.cpp.
|
inline |
Definition at line 139 of file ObjectLinkingLayer.cpp.
|
inlineoverridevirtual |
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.
Implements llvm::jitlink::JITLinkContext.
Definition at line 202 of file ObjectLinkingLayer.cpp.
References assert(), llvm::JITSymbolFlags::Callable, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::jitlink::Default, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::JITSymbolFlags::Exported, G, llvm::jitlink::Local, llvm::JITSymbolFlags::Weak, and llvm::jitlink::Weak.