LLVM
12.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/Core.h"
Public Member Functions | |
MaterializationUnit (SymbolFlagsMap InitalSymbolFlags, SymbolStringPtr InitSymbol) | |
virtual | ~MaterializationUnit () |
virtual StringRef | getName () const =0 |
Return the name of this materialization unit. More... | |
const SymbolFlagsMap & | getSymbols () const |
Return the set of symbols that this source provides. More... | |
const SymbolStringPtr & | getInitializerSymbol () const |
Returns the initialization symbol for this MaterializationUnit (if any). More... | |
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. More... | |
void | doDiscard (const JITDylib &JD, const SymbolStringPtr &Name) |
Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden. More... | |
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.
|
inline |
Definition at line 640 of file Core.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), and SymbolFlags.
|
inlinevirtual |
|
inline |
Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden.
Definition at line 668 of file Core.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::move(), and SymbolFlags.
|
inline |
Returns the initialization symbol for this MaterializationUnit (if any).
Definition at line 658 of file Core.h.
References InitSymbol.
Referenced by llvm::orc::MachOPlatform::notifyAdding().
|
pure virtual |
Return the name of this materialization unit.
Useful for debugging output.
Implemented in llvm::orc::ReExportsMaterializationUnit, llvm::orc::AbsoluteSymbolsMaterializationUnit, llvm::orc::BasicObjectLayerMaterializationUnit, llvm::orc::LazyReexportsMaterializationUnit, and llvm::orc::IRMaterializationUnit.
Referenced by llvm::orc::MachOPlatform::notifyAdding(), and llvm::orc::operator<<().
|
inline |
Return the set of symbols that this source provides.
Definition at line 655 of file Core.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.
|
friend |
|
protected |
Definition at line 675 of file Core.h.
Referenced by llvm::orc::BasicObjectLayerMaterializationUnit::Create(), getInitializerSymbol(), and llvm::orc::IRMaterializationUnit::IRMaterializationUnit().
|
protected |
Definition at line 674 of file Core.h.
Referenced by llvm::orc::BasicObjectLayerMaterializationUnit::Create(), doDiscard(), getSymbols(), llvm::orc::IRMaterializationUnit::IRMaterializationUnit(), and MaterializationUnit().