14 #ifndef LLVM_EXECUTIONENGINE_JITSYMBOL_H
15 #define LLVM_EXECUTIONENGINE_JITSYMBOL_H
96 : Address(Address), Flags(Flags) {}
99 explicit operator bool()
const {
return Address != 0; }
124 : CachedAddr(Addr), Flags(Flags) {}
140 : GetAddress(std::move(GetAddress)), CachedAddr(0), Flags(Flags) {}
143 explicit operator bool()
const {
return CachedAddr || GetAddress; }
149 CachedAddr = GetAddress();
150 assert(CachedAddr &&
"Symbol could not be materialized.");
151 GetAddress =
nullptr;
192 virtual void anchor();
197 #endif // LLVM_EXECUTIONENGINE_JITSYMBOL_H
virtual JITSymbol findSymbolInLogicalDylib(const std::string &Name)=0
This method returns the address of the specified symbol if it exists within the logical dynamic libra...
static JITSymbolFlags fromGlobalValue(const GlobalValue &GV)
Construct a JITSymbolFlags value based on the flags of the given global value.
JITTargetAddress getAddress()
Get the address of the symbol in the target address space.
Represents a symbol in the JIT.
virtual JITSymbol findSymbol(const std::string &Name)=0
This method returns the address of the specified function or variable.
std::function< JITTargetAddress()> GetAddressFtor
JITSymbolFlags()
Default-construct a JITSymbolFlags instance.
JITEvaluatedSymbol(std::nullptr_t)
Create a 'null' symbol.
JITSymbolFlags(FlagNames Flags)
Construct a JITSymbolFlags instance from the given flags.
Flags for symbols in the JIT.
static JITSymbolFlags fromObjectSymbol(const object::BasicSymbolRef &Symbol)
Construct a JITSymbolFlags value based on the flags of the given libobject symbol.
uint64_t JITTargetAddress
Represents an address in the target process's address space.
JITSymbol(JITEvaluatedSymbol Sym)
Construct a JITSymbol from a JITEvaluatedSymbol.
JITEvaluatedSymbol(JITTargetAddress Address, JITSymbolFlags Flags)
Create a symbol for the given address and flags.
virtual ~JITSymbolResolver()=default
bool isCommon() const
Returns true is the Weak flag is set.
JITSymbol(std::nullptr_t)
Create a 'null' symbol that represents failure to find a symbol definition.
Represents a symbol that has been evaluated to an address already.
JITTargetAddress getAddress() const
Return the address of this symbol.
bool isExported() const
Returns true is the Weak flag is set.
JITSymbol(JITTargetAddress Addr, JITSymbolFlags Flags)
Create a symbol for a definition with a known address.
This is a value type class that represents a single symbol in the list of symbols in the object file...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isWeak() const
Returns true is the Weak flag is set.
JITSymbolFlags getFlags() const
Return the flags for this symbol.
JITSymbolFlags getFlags() const
JITSymbol(GetAddressFtor GetAddress, JITSymbolFlags Flags)
Create a symbol for a definition that doesn't have a known address yet.
bool isStrongDefinition() const