30 if (isa<Function>(GV))
32 else if (isa<GlobalAlias>(GV) &&
33 isa<Function>(cast<GlobalAlias>(GV).getAliasee()))
73 for (
auto &
Symbol : Symbols) {
74 std::string SymName =
Symbol.str();
76 if (
auto AddrOrErr = Sym.getAddress())
79 OnResolved(AddrOrErr.takeError());
82 }
else if (
auto Err = Sym.takeError()) {
83 OnResolved(std::move(Err));
88 if (
auto AddrOrErr = Sym.getAddress())
91 OnResolved(AddrOrErr.takeError());
94 }
else if (
auto Err = Sym.takeError()) {
95 OnResolved(std::move(Err));
98 OnResolved(make_error<StringError>(
"Symbol not found: " +
Symbol,
105 OnResolved(std::move(Result));
114 for (
auto &
Symbol : Symbols) {
115 std::string SymName =
Symbol.str();
119 if (!Sym.getFlags().isStrong())
121 }
else if (
auto Err = Sym.takeError())
122 return std::move(Err);
130 return std::move(Result);
bool hasLocalLinkage() const
static JITSymbolFlags fromGlobalValue(const GlobalValue &GV)
Construct a JITSymbolFlags value based on the flags of the given global value.
This class represents lattice values for constants.
Expected< LookupSet > getResponsibilitySet(const LookupSet &Symbols) final
Performs flags lookup by calling findSymbolInLogicalDylib and returning the flags value for that symb...
static Expected< JITSymbolFlags > fromObjectSymbol(const object::SymbolRef &Symbol)
Construct a JITSymbolFlags value based on the flags of the given libobject symbol.
std::set< StringRef > LookupSet
virtual JITSymbol findSymbol(const std::string &Name)=0
This method returns the address of the specified function or variable.
Tagged union holding either a T or a Error.
bool hasCommonLinkage() const
bool hasLinkOnceLinkage() const
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...
Flags for symbols in the JIT.
bool hasWeakLinkage() const
Expected< SymbolRef::Type > getType() const
Represents a symbol that has been evaluated to an address already.
bool hasHiddenVisibility() const
This is a value type class that represents a single symbol in the list of symbols in the object file...
uint32_t getFlags() const
Get symbol flags (bitwise OR of SymbolRef::Flags)
std::map< StringRef, JITEvaluatedSymbol > LookupResult
ARM-specific JIT symbol flags.
static ARMJITSymbolFlags fromObjectSymbol(const object::SymbolRef &Symbol)
void lookup(const LookupSet &Symbols, OnResolvedFunction OnResolved) final
Performs lookup by, for each symbol, first calling findSymbolInLogicalDylib and if that fails calling...
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...