LLVM 20.0.0git
|
LazyObjectLinkingLayer is an adapter for ObjectLinkingLayer that builds lazy reexports for all function symbols in objects that are/ added to defer linking until the first call to a function defined in the object. More...
#include "llvm/ExecutionEngine/Orc/LazyObjectLinkingLayer.h"
Classes | |
class | RenamerPlugin |
Public Member Functions | |
LazyObjectLinkingLayer (ObjectLinkingLayer &BaseLayer, LazyReexportsManager &LRMgr) | |
llvm::Error | add (llvm::orc::ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I) override |
Add an object file to the JITDylib targeted by the given tracker. | |
void | emit (std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override |
Emit should materialize the given IR. | |
Public Member Functions inherited from llvm::orc::ObjectLayer | |
ObjectLayer (ExecutionSession &ES) | |
virtual | ~ObjectLayer () |
ExecutionSession & | getExecutionSession () |
Returns the execution session for this layer. | |
virtual Error | add (ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I) |
Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the given ResourceTracker. | |
Error | add (ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > O) |
Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the given ResourceTracker. | |
Error | add (JITDylib &JD, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I) |
Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib. | |
Error | add (JITDylib &JD, std::unique_ptr< MemoryBuffer > O) |
Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib. | |
virtual void | emit (std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O)=0 |
Emit should materialize the given IR. | |
Public Member Functions inherited from llvm::RTTIExtends< ObjectLayer, RTTIRoot > | |
const void * | dynamicClassID () const override |
bool | isA () const |
Check whether this instance is a subclass of QueryT. | |
bool | isA (const void *const ClassID) const override |
Public Member Functions inherited from llvm::RTTIRoot | |
virtual | ~RTTIRoot ()=default |
virtual const void * | dynamicClassID () const =0 |
Returns the class ID for the dynamic type of this RTTIRoot instance. | |
virtual bool | isA (const void *const ClassID) const |
Returns true if this class's ID matches the given class ID. | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::RTTIExtends< ObjectLayer, RTTIRoot > | |
static const void * | classID () |
static bool | classof (const T *R) |
Static Public Member Functions inherited from llvm::RTTIRoot | |
static const void * | classID () |
Returns the class ID for this type. | |
Static Public Attributes inherited from llvm::orc::ObjectLayer | |
static char | ID |
LazyObjectLinkingLayer is an adapter for ObjectLinkingLayer that builds lazy reexports for all function symbols in objects that are/ added to defer linking until the first call to a function defined in the object.
Linking is performed by emitting the object file via the base ObjectLinkingLayer.
No partitioning is performed: The first call to any function in the object will trigger linking of the whole object.
References to data symbols are not lazy and will trigger immediate linking (same os ObjectlinkingLayer).
Definition at line 36 of file LazyObjectLinkingLayer.h.
llvm::orc::LazyObjectLinkingLayer::LazyObjectLinkingLayer | ( | ObjectLinkingLayer & | BaseLayer, |
LazyReexportsManager & | LRMgr | ||
) |
Definition at line 73 of file LazyObjectLinkingLayer.cpp.
References llvm::orc::LinkGraphLinkingLayer::addPlugin().
|
overridevirtual |
Add an object file to the JITDylib targeted by the given tracker.
Reimplemented from llvm::orc::ObjectLayer.
Definition at line 80 of file LazyObjectLinkingLayer.cpp.
References llvm::orc::ObjectLinkingLayer::add(), llvm::orc::ObjectLayer::getExecutionSession(), I, llvm::orc::lazyReexports(), and Name.
|
overridevirtual |
Emit should materialize the given IR.
Implements llvm::orc::ObjectLayer.
Definition at line 106 of file LazyObjectLinkingLayer.cpp.
References llvm::orc::ObjectLinkingLayer::emit().