LLVM 20.0.0git
|
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group, or individually discarded (when overriding definitions are encountered). More...
#include "llvm/ExecutionEngine/Orc/MaterializationUnit.h"
Classes | |
struct | Interface |
Public Member Functions | |
MaterializationUnit (Interface I) | |
virtual | ~MaterializationUnit ()=default |
virtual StringRef | getName () const =0 |
Return the name of this materialization unit. | |
const SymbolFlagsMap & | getSymbols () const |
Return the set of symbols that this source provides. | |
const SymbolStringPtr & | getInitializerSymbol () const |
Returns the initialization symbol for this MaterializationUnit (if any). | |
virtual void | materialize (std::unique_ptr< MaterializationResponsibility > R)=0 |
Implementations of this method should materialize all symbols in the materialzation unit, except for those that have been previously discarded. | |
void | doDiscard (const JITDylib &JD, const SymbolStringPtr &Name) |
Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden. | |
Static Public Attributes | |
static char | ID |
Protected Attributes | |
SymbolFlagsMap | SymbolFlags |
SymbolStringPtr | InitSymbol |
Friends | |
class | ExecutionSession |
class | JITDylib |
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group, or individually discarded (when overriding definitions are encountered).
MaterializationUnits are used when providing lazy definitions of symbols to JITDylibs. The JITDylib will call materialize when the address of a symbol is requested via the lookup method. The JITDylib will call discard if a stronger definition is added or already present.
Definition at line 32 of file MaterializationUnit.h.
|
inline |
Definition at line 52 of file MaterializationUnit.h.
|
virtualdefault |
|
inline |
Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden.
Definition at line 75 of file MaterializationUnit.h.
References llvm::dbgs(), DEBUG_WITH_TYPE, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), getName(), InitSymbol, Name, and SymbolFlags.
|
inline |
Returns the initialization symbol for this MaterializationUnit (if any).
Definition at line 65 of file MaterializationUnit.h.
References InitSymbol.
Referenced by llvm::orc::COFFPlatform::notifyAdding(), llvm::orc::ELFNixPlatform::notifyAdding(), and llvm::orc::MachOPlatform::notifyAdding().
|
pure virtual |
Return the name of this materialization unit.
Useful for debugging output.
Implemented in llvm::orc::AbsoluteSymbolsMaterializationUnit, llvm::orc::ReExportsMaterializationUnit, llvm::orc::IRMaterializationUnit, llvm::orc::BasicObjectLayerMaterializationUnit, llvm::orc::LazyReexportsMaterializationUnit, llvm::orc::LinkGraphMaterializationUnit, llvm::orc::SimpleMachOHeaderMU, llvm::orc::RedirectableMaterializationUnit, llvm::orc::SectCreateMaterializationUnit, and LLVMOrcLazyCallThroughManagerRef::OrcCAPIMaterializationUnit.
Referenced by doDiscard(), llvm::orc::COFFPlatform::notifyAdding(), llvm::orc::ELFNixPlatform::notifyAdding(), llvm::orc::MachOPlatform::notifyAdding(), and llvm::orc::operator<<().
|
inline |
Return the set of symbols that this source provides.
Definition at line 62 of file MaterializationUnit.h.
References SymbolFlags.
Referenced by llvm::orc::operator<<().
|
pure virtual |
Implementations of this method should materialize all symbols in the materialzation unit, except for those that have been previously discarded.
Implemented in llvm::orc::LinkGraphMaterializationUnit, llvm::orc::SimpleMachOHeaderMU, llvm::orc::RedirectableMaterializationUnit, llvm::orc::SectCreateMaterializationUnit, and LLVMOrcLazyCallThroughManagerRef::OrcCAPIMaterializationUnit.
|
friend |
Definition at line 33 of file MaterializationUnit.h.
|
friend |
Definition at line 34 of file MaterializationUnit.h.
|
static |
Definition at line 37 of file MaterializationUnit.h.
|
protected |
Definition at line 89 of file MaterializationUnit.h.
Referenced by doDiscard(), getInitializerSymbol(), and llvm::orc::IRMaterializationUnit::IRMaterializationUnit().
|
protected |
Definition at line 88 of file MaterializationUnit.h.
Referenced by doDiscard(), getSymbols(), and llvm::orc::IRMaterializationUnit::IRMaterializationUnit().