13#define DEBUG_TYPE "orc"
26 assert(
G &&
"GVs cannot contain null elements");
27 if (!
G->hasName() ||
G->isDeclaration() ||
G->hasLocalLinkage() ||
28 G->hasAvailableExternallyLinkage() ||
G->hasAppendingLinkage())
36 auto EmuTLSV = Mangle((
"__emutls_v." + GV->getName()).str());
37 SymbolFlags[EmuTLSV] = Flags;
38 if (SymbolToDefinition)
39 (*SymbolToDefinition)[EmuTLSV] = GV;
43 if (GV->hasInitializer()) {
44 const auto *InitVal = GV->getInitializer();
50 if (InitIntValue && InitIntValue->isZero())
53 auto EmuTLST = Mangle((
"__emutls_t." + GV->getName()).str());
54 SymbolFlags[EmuTLST] = Flags;
55 if (SymbolToDefinition)
56 (*SymbolToDefinition)[EmuTLST] = GV;
62 auto MangledName = Mangle(
G->getName());
64 if (SymbolToDefinition)
65 (*SymbolToDefinition)[MangledName] =
G;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool empty() const
Check if the array is empty.
static LLVM_ABI JITSymbolFlags fromGlobalValue(const GlobalValue &GV)
Construct a JITSymbolFlags value based on the flags of the given global value.
An ExecutionSession represents a running JIT program.
static LLVM_ABI void add(ExecutionSession &ES, const ManglingOptions &MO, ArrayRef< GlobalValue * > GVs, SymbolFlagsMap &SymbolFlags, SymbolNameToDefinitionMap *SymbolToDefinition=nullptr)
Add mangled symbols for the given GlobalValues to SymbolFlags.
std::map< SymbolStringPtr, GlobalValue * > SymbolNameToDefinitionMap
Mangles symbol names then uniques them in the context of an ExecutionSession.
DenseMap< SymbolStringPtr, JITSymbolFlags > SymbolFlagsMap
A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.