13#ifndef LLVM_EXECUTIONENGINE_ORC_MATERIALIZATIONUNIT_H
14#define LLVM_EXECUTIONENGINE_ORC_MATERIALIZATIONUNIT_H
46 "If set, InitSymbol should appear in InitialSymbolFlags map");
72 materialize(std::unique_ptr<MaterializationResponsibility> R) = 0;
80 dbgs() <<
"In " <<
getName() <<
": discarding init symbol \""
85 discard(JD, std::move(Name));
93 virtual void anchor();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static StringRef getName(Value *V)
#define DEBUG_WITH_TYPE(TYPE,...)
DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.
StringRef - Represent a constant reference to a string, i.e.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
MaterializationUnit(Interface I)
virtual StringRef getName() const =0
Return the name of this materialization unit.
SymbolStringPtr InitSymbol
SymbolFlagsMap SymbolFlags
const SymbolFlagsMap & getSymbols() const
Return the set of symbols that this source provides.
virtual void materialize(std::unique_ptr< MaterializationResponsibility > R)=0
Implementations of this method should materialize all symbols in the materialzation unit,...
const SymbolStringPtr & getInitializerSymbol() const
Returns the initialization symbol for this MaterializationUnit (if any).
void doDiscard(const JITDylib &JD, const SymbolStringPtr &Name)
Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden.
friend class ExecutionSession
virtual ~MaterializationUnit()=default
Pointer to a pooled string representing a symbol name.
DenseMap< SymbolStringPtr, JITSymbolFlags > SymbolFlagsMap
A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
SymbolFlagsMap SymbolFlags
SymbolStringPtr InitSymbol
Interface(SymbolFlagsMap InitalSymbolFlags, SymbolStringPtr InitSymbol)