LLVM 22.0.0git
|
#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h"
Public Types | |
using | NotifyLoadedFunction |
Functor for receiving object-loaded notifications. | |
using | NotifyEmittedFunction |
Functor for receiving finalization notifications. | |
using | GetMemoryManagerFunction |
Public Member Functions | |
RTDyldObjectLinkingLayer (ExecutionSession &ES, GetMemoryManagerFunction GetMemoryManager) | |
Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyEmitted functors. | |
~RTDyldObjectLinkingLayer () | |
void | emit (std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override |
Emit the object. | |
RTDyldObjectLinkingLayer & | setNotifyLoaded (NotifyLoadedFunction NotifyLoaded) |
Set the NotifyLoaded callback. | |
RTDyldObjectLinkingLayer & | setNotifyEmitted (NotifyEmittedFunction NotifyEmitted) |
Set the NotifyEmitted callback. | |
RTDyldObjectLinkingLayer & | setProcessAllSections (bool ProcessAllSections) |
Set the 'ProcessAllSections' flag. | |
RTDyldObjectLinkingLayer & | setOverrideObjectFlagsWithResponsibilityFlags (bool OverrideObjectFlags) |
Instructs this RTDyldLinkingLayer2 instance to override the symbol flags returned by RuntimeDyld for any given object file with the flags supplied by the MaterializationResponsibility instance. | |
RTDyldObjectLinkingLayer & | setAutoClaimResponsibilityForObjectSymbols (bool AutoClaimObjectSymbols) |
If set, this RTDyldObjectLinkingLayer instance will claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance. | |
void | registerJITEventListener (JITEventListener &L) |
Register a JITEventListener. | |
void | unregisterJITEventListener (JITEventListener &L) |
Unregister a JITEventListener. | |
Public Member Functions inherited from llvm::RTTIExtends< RTDyldObjectLinkingLayer, ObjectLayer > | |
const void * | dynamicClassID () const override |
bool | isA () const |
Check whether this instance is a subclass of QueryT. |
Static Public Attributes | |
static char | ID |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::RTTIExtends< RTDyldObjectLinkingLayer, ObjectLayer > | |
static const void * | classID () |
static bool | classof (const T *R) |
Definition at line 37 of file RTDyldObjectLinkingLayer.h.
Definition at line 52 of file RTDyldObjectLinkingLayer.h.
Functor for receiving finalization notifications.
Definition at line 49 of file RTDyldObjectLinkingLayer.h.
Functor for receiving object-loaded notifications.
Definition at line 44 of file RTDyldObjectLinkingLayer.h.
llvm::orc::RTDyldObjectLinkingLayer::RTDyldObjectLinkingLayer | ( | ExecutionSession & | ES, |
GetMemoryManagerFunction | GetMemoryManager ) |
Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyEmitted functors.
Definition at line 85 of file RTDyldObjectLinkingLayer.cpp.
References llvm::move(), and llvm::orc::ExecutionSession::registerResourceManager().
Referenced by setNotifyLoaded(), and setProcessAllSections().
llvm::orc::RTDyldObjectLinkingLayer::~RTDyldObjectLinkingLayer | ( | ) |
Definition at line 91 of file RTDyldObjectLinkingLayer.cpp.
References assert().
|
override |
Emit the object.
Definition at line 98 of file RTDyldObjectLinkingLayer.cpp.
References assert(), llvm::object::ObjectFile::createObjectFile(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::JITSymbolFlags::fromObjectSymbol(), llvm::jitLinkForORC(), llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Weak, llvm::object::SymbolRef::ST_File, and llvm::Expected< T >::takeError().
void llvm::orc::RTDyldObjectLinkingLayer::registerJITEventListener | ( | JITEventListener & | L | ) |
Definition at line 217 of file RTDyldObjectLinkingLayer.cpp.
References assert(), and llvm::is_contained().
|
inline |
If set, this RTDyldObjectLinkingLayer instance will claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance.
Setting this flag allows higher-level program representations (e.g. LLVM IR) to be added based on only a subset of the symbols they provide, without having to write intervening layers to scan and add the additional symbols. This trades diagnostic quality for convenience however: If all symbols are enumerated up-front then clashes can be detected and reported early (and usually deterministically). If this option is set, clashes for the additional symbols may not be detected until late, and detection may depend on the flow of control through JIT'd code. Use with care.
Definition at line 117 of file RTDyldObjectLinkingLayer.h.
|
inline |
Set the NotifyEmitted callback.
Definition at line 75 of file RTDyldObjectLinkingLayer.h.
|
inline |
Set the NotifyLoaded callback.
Definition at line 68 of file RTDyldObjectLinkingLayer.h.
References RTDyldObjectLinkingLayer().
|
inline |
Instructs this RTDyldLinkingLayer2 instance to override the symbol flags returned by RuntimeDyld for any given object file with the flags supplied by the MaterializationResponsibility instance.
This is a workaround to support symbol visibility in COFF, which does not use the libObject's SF_Exported flag. Use only when generating / adding COFF object files.
FIXME: We should be able to remove this if/when COFF properly tracks exported symbols.
Definition at line 100 of file RTDyldObjectLinkingLayer.h.
|
inline |
Set the 'ProcessAllSections' flag.
If set to true, all sections in each object file will be allocated using the memory manager, rather than just the sections required for execution.
This is kludgy, and may be removed in the future.
Definition at line 86 of file RTDyldObjectLinkingLayer.h.
References RTDyldObjectLinkingLayer().
void llvm::orc::RTDyldObjectLinkingLayer::unregisterJITEventListener | ( | JITEventListener & | L | ) |
Unregister a JITEventListener.
Definition at line 224 of file RTDyldObjectLinkingLayer.cpp.
References assert(), llvm::find(), and I.
|
static |
Definition at line 41 of file RTDyldObjectLinkingLayer.h.