LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::orc::ObjectLinkingLayerJITLinkContext Class Referencefinal
Inheritance diagram for llvm::orc::ObjectLinkingLayerJITLinkContext:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::ObjectLinkingLayerJITLinkContext:
Collaboration graph
[legend]

Public Member Functions

 ObjectLinkingLayerJITLinkContext (ObjectLinkingLayer &Layer, MaterializationResponsibility MR, std::unique_ptr< MemoryBuffer > ObjBuffer)
 
 ~ObjectLinkingLayerJITLinkContext ()
 
JITLinkMemoryManagergetMemoryManager () override
 Return the MemoryManager to be used for this link. More...
 
MemoryBufferRef getObjectBuffer () const override
 Returns a StringRef for the object buffer. More...
 
void notifyFailed (Error Err) override
 Notify this context that linking failed. More...
 
void lookup (const DenseSet< StringRef > &Symbols, std::unique_ptr< JITLinkAsyncLookupContinuation > LC) override
 Called by JITLink to resolve external symbols. More...
 
void 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 (std::unique_ptr< JITLinkMemoryManager::Allocation > 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 (const Triple &TT, PassConfiguration &Config) override
 Called by JITLink to modify the pass pipeline prior to linking. More...
 

Detailed Description

Definition at line 25 of file ObjectLinkingLayer.cpp.

Constructor & Destructor Documentation

◆ ObjectLinkingLayerJITLinkContext()

llvm::orc::ObjectLinkingLayerJITLinkContext::ObjectLinkingLayerJITLinkContext ( ObjectLinkingLayer Layer,
MaterializationResponsibility  MR,
std::unique_ptr< MemoryBuffer ObjBuffer 
)
inline

Definition at line 27 of file ObjectLinkingLayer.cpp.

◆ ~ObjectLinkingLayerJITLinkContext()

llvm::orc::ObjectLinkingLayerJITLinkContext::~ObjectLinkingLayerJITLinkContext ( )
inline

Definition at line 32 of file ObjectLinkingLayer.cpp.

Member Function Documentation

◆ getMarkLivePass()

LinkGraphPassFunction llvm::orc::ObjectLinkingLayerJITLinkContext::getMarkLivePass ( const Triple TT) const
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 151 of file ObjectLinkingLayer.cpp.

References G.

◆ getMemoryManager()

JITLinkMemoryManager& llvm::orc::ObjectLinkingLayerJITLinkContext::getMemoryManager ( )
inlineoverridevirtual

Return the MemoryManager to be used for this link.

Implements llvm::jitlink::JITLinkContext.

Definition at line 39 of file ObjectLinkingLayer.cpp.

◆ getObjectBuffer()

MemoryBufferRef llvm::orc::ObjectLinkingLayerJITLinkContext::getObjectBuffer ( ) const
inlineoverridevirtual

Returns a StringRef for the object buffer.

This method can not be called once takeObjectBuffer has been called.

Implements llvm::jitlink::JITLinkContext.

Definition at line 41 of file ObjectLinkingLayer.cpp.

◆ lookup()

void llvm::orc::ObjectLinkingLayerJITLinkContext::lookup ( const DenseSet< StringRef > &  Symbols,
std::unique_ptr< JITLinkAsyncLookupContinuation LC 
)
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 50 of file ObjectLinkingLayer.cpp.

References llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().

◆ modifyPassConfig()

Error llvm::orc::ObjectLinkingLayerJITLinkContext::modifyPassConfig ( const Triple TT,
PassConfiguration Config 
)
inlineoverridevirtual

◆ notifyFailed()

void llvm::orc::ObjectLinkingLayerJITLinkContext::notifyFailed ( Error  Err)
inlineoverridevirtual

Notify this context that linking failed.

Called by JITLink if linking cannot be completed.

Implements llvm::jitlink::JITLinkContext.

Definition at line 45 of file ObjectLinkingLayer.cpp.

◆ notifyFinalized()

void llvm::orc::ObjectLinkingLayerJITLinkContext::notifyFinalized ( std::unique_ptr< JITLinkMemoryManager::Allocation A)
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 138 of file ObjectLinkingLayer.cpp.

◆ notifyResolved()

void llvm::orc::ObjectLinkingLayerJITLinkContext::notifyResolved ( LinkGraph G)
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.

Implements llvm::jitlink::JITLinkContext.

Definition at line 83 of file ObjectLinkingLayer.cpp.

References llvm::JITSymbolFlags::Absolute, llvm::jitlink::LinkGraph::absolute_symbols(), assert(), llvm::JITSymbolFlags::Callable, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::jitlink::Default, llvm::jitlink::LinkGraph::defined_symbols(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::JITSymbolFlags::Exported, llvm::jitlink::Local, llvm::JITSymbolFlags::Weak, and llvm::jitlink::Weak.


The documentation for this class was generated from the following file: