19#define DEBUG_TYPE "orc"
28 bool IsMachO =
G.getTargetTriple().isOSBinFormatMachO();
29 bool IsElf =
G.getTargetTriple().isOSBinFormatELF();
30 if (!IsMachO && !IsElf)
33 for (
auto &Sec :
G.sections()) {
45 switch (TT.getArch()) {
65 if (Sym.
getScope() == Scope::Default)
76 static std::unique_ptr<LinkGraphMaterializationUnit>
78 auto LGI = scanLinkGraph(ObjLinkingLayer.getExecutionSession(), *
G);
79 return std::unique_ptr<LinkGraphMaterializationUnit>(
80 new LinkGraphMaterializationUnit(ObjLinkingLayer, std::move(
G),
85 void materialize(std::unique_ptr<MaterializationResponsibility> MR)
override {
86 ObjLinkingLayer.
emit(std::move(MR), std::move(
G));
94 for (
auto *Sym :
G.defined_symbols()) {
101 getJITSymbolFlagsForSymbol(*Sym);
104 if (hasInitializerSection(
G))
105 LGI.InitSymbol = makeInitSymbol(ES,
G);
111 std::string InitSymString;
113 <<
"$." <<
G.getName() <<
".__inits" << Counter++;
114 return ES.
intern(InitSymString);
118 std::unique_ptr<LinkGraph>
G, Interface LGI)
123 for (
auto *Sym :
G->defined_symbols())
126 "Discarding non-weak definition");
127 G->makeExternal(*Sym);
133 std::unique_ptr<LinkGraph>
G;
134 static std::atomic<uint64_t> Counter;
137std::atomic<uint64_t> LinkGraphMaterializationUnit::Counter{0};
148 std::unique_ptr<MaterializationResponsibility> MR,
149 std::unique_ptr<MemoryBuffer> ObjBuffer)
156 if (Layer.ReturnObjectBuffer && ObjBuffer)
157 Layer.ReturnObjectBuffer(std::move(ObjBuffer));
163 for (
auto &
P : Layer.Plugins)
164 P->notifyMaterializing(*MR,
G, *
this,
165 ObjBuffer ? ObjBuffer->getMemBufferRef()
170 for (
auto &
P : Layer.Plugins)
171 Err =
joinErrors(std::move(Err),
P->notifyFailed(*MR));
172 Layer.getExecutionSession().reportError(std::move(Err));
173 MR->failMaterialization();
177 std::unique_ptr<JITLinkAsyncLookupContinuation> LC)
override {
180 MR->getTargetJITDylib().withLinkOrderDo(
183 auto &ES = Layer.getExecutionSession();
186 for (
auto &KV : Symbols) {
196 LookupSet.
add(ES.intern(KV.first), LookupFlags);
200 auto OnResolve = [LookupContinuation =
203 LookupContinuation->run(
Result.takeError());
207 LR[*KV.first] = KV.second;
208 LookupContinuation->run(std::move(LR));
212 for (
auto &KV : InternalNamedSymbolDeps) {
214 InternalDeps[&MR->getTargetJITDylib()] = std::move(KV.second);
215 MR->addDependencies(KV.first, InternalDeps);
221 registerDependencies(Deps);
226 auto &ES = Layer.getExecutionSession();
229 bool AutoClaim = Layer.AutoClaimObjectSymbols;
232 for (
auto *Sym :
G.defined_symbols())
233 if (Sym->hasName() && Sym->getScope() != Scope::Local) {
234 auto InternedName = ES.intern(Sym->getName());
235 auto Ptr = getJITSymbolPtrForSymbol(*Sym,
G.getTargetTriple());
236 auto Flags = getJITSymbolFlagsForSymbol(*Sym);
238 if (AutoClaim && !MR->getSymbols().count(InternedName)) {
240 "Duplicate symbol to claim?");
241 ExtraSymbolsToClaim[InternedName] =
Flags;
245 for (
auto *Sym :
G.absolute_symbols())
246 if (Sym->hasName() && Sym->getScope() != Scope::Local) {
247 auto InternedName = ES.intern(Sym->getName());
248 auto Ptr = getJITSymbolPtrForSymbol(*Sym,
G.getTargetTriple());
249 auto Flags = getJITSymbolFlagsForSymbol(*Sym);
251 if (AutoClaim && !MR->getSymbols().count(InternedName)) {
253 "Duplicate symbol to claim?");
254 ExtraSymbolsToClaim[InternedName] =
Flags;
258 if (!ExtraSymbolsToClaim.
empty())
259 if (
auto Err = MR->defineMaterializing(ExtraSymbolsToClaim))
269 size_t NumMaterializationSideEffectsOnlySymbols = 0;
272 for (
auto &KV : MR->getSymbols()) {
274 auto I = InternedResult.
find(KV.first);
279 if (KV.second.hasMaterializationSideEffectsOnly()) {
280 ++NumMaterializationSideEffectsOnlySymbols;
281 if (
I != InternedResult.
end())
282 ExtraSymbols.push_back(KV.first);
284 }
else if (
I == InternedResult.
end())
285 MissingSymbols.push_back(KV.first);
286 else if (Layer.OverrideObjectFlags)
287 I->second.setFlags(KV.second);
291 if (!MissingSymbols.empty())
292 return make_error<MissingSymbolDefinitions>(
293 Layer.getExecutionSession().getSymbolStringPool(),
G.getName(),
294 std::move(MissingSymbols));
298 if (InternedResult.
size() >
299 MR->getSymbols().size() - NumMaterializationSideEffectsOnlySymbols) {
300 for (
auto &KV : InternedResult)
301 if (!MR->getSymbols().count(KV.first))
302 ExtraSymbols.push_back(KV.first);
306 if (!ExtraSymbols.empty())
307 return make_error<UnexpectedSymbolDefinitions>(
308 Layer.getExecutionSession().getSymbolStringPool(),
G.getName(),
309 std::move(ExtraSymbols));
312 if (
auto Err = MR->notifyResolved(InternedResult))
315 Layer.notifyLoaded(*MR);
320 if (
auto Err = Layer.notifyEmitted(*MR, std::move(
A))) {
321 Layer.getExecutionSession().reportError(std::move(Err));
322 MR->failMaterialization();
325 if (
auto Err = MR->notifyEmitted()) {
326 Layer.getExecutionSession().reportError(std::move(Err));
327 MR->failMaterialization();
332 return [
this](
LinkGraph &
G) {
return markResponsibilitySymbolsLive(
G); };
339 return claimOrExternalizeWeakAndCommonSymbols(
G);
342 Layer.modifyPassConfig(*MR, LG, Config);
345 [
this](
LinkGraph &
G) {
return computeNamedSymbolDependencies(
G); });
354 struct BlockSymbolDependencies {
359 class BlockDependenciesMap {
363 : ES(ES), BlockDeps(
std::
move(BlockDeps)) {}
365 const BlockSymbolDependencies &operator[](
const Block &
B) {
367 auto I = BlockTransitiveDepsCache.find(&
B);
368 if (
I != BlockTransitiveDepsCache.end())
372 BlockSymbolDependencies BTDCacheVal;
373 auto BDI = BlockDeps.find(&
B);
374 assert(BDI != BlockDeps.end() &&
"No block dependencies");
376 for (
auto *BDep : BDI->second) {
377 auto &BID = getBlockImmediateDeps(*BDep);
378 for (
auto &ExternalDep : BID.External)
379 BTDCacheVal.External.insert(ExternalDep);
380 for (
auto &InternalDep : BID.Internal)
381 BTDCacheVal.Internal.insert(InternalDep);
384 return BlockTransitiveDepsCache
385 .insert(std::make_pair(&
B, std::move(BTDCacheVal)))
390 auto I = NameCache.find(&Sym);
391 if (
I != NameCache.end())
394 return NameCache.insert(std::make_pair(&Sym, ES.intern(Sym.
getName())))
399 BlockSymbolDependencies &getBlockImmediateDeps(
Block &
B) {
401 auto I = BlockImmediateDepsCache.find(&
B);
402 if (
I != BlockImmediateDepsCache.end())
405 BlockSymbolDependencies BIDCacheVal;
406 for (
auto &
E :
B.edges()) {
407 auto &Tgt =
E.getTarget();
408 if (Tgt.getScope() != Scope::Local) {
409 if (Tgt.isExternal())
410 BIDCacheVal.External.insert(getInternedName(Tgt));
412 BIDCacheVal.Internal.insert(getInternedName(Tgt));
416 return BlockImmediateDepsCache
417 .insert(std::make_pair(&
B, std::move(BIDCacheVal)))
429 auto &ES = Layer.getExecutionSession();
432 std::vector<std::pair<SymbolStringPtr, Symbol *>> NameToSym;
434 auto ProcessSymbol = [&](
Symbol *Sym) {
438 if (!MR->getSymbols().count(ES.intern(Sym->
getName()))) {
439 NewSymbolsToClaim[
Name] =
441 NameToSym.push_back(std::make_pair(std::move(
Name), Sym));
446 for (
auto *Sym :
G.defined_symbols())
448 for (
auto *Sym :
G.absolute_symbols())
454 cantFail(MR->defineMaterializing(std::move(NewSymbolsToClaim)));
459 for (
auto &KV : NameToSym) {
460 if (MR->getSymbols().count(KV.first))
461 KV.second->setLive(
true);
463 G.makeExternal(*KV.second);
470 auto &ES = Layer.getExecutionSession();
471 for (
auto *Sym :
G.defined_symbols())
472 if (Sym->
hasName() && MR->getSymbols().count(ES.intern(Sym->
getName())))
478 auto &ES = MR->getTargetJITDylib().getExecutionSession();
479 auto BlockDeps = computeBlockNonLocalDeps(
G);
482 for (
auto *Sym :
G.defined_symbols()) {
485 if (Sym->
getScope() == Scope::Local)
488 "Defined non-local jitlink::Symbol should have a name");
490 auto &SymDeps = BlockDeps[Sym->
getBlock()];
491 if (SymDeps.External.empty() && SymDeps.Internal.empty())
494 auto SymName = ES.intern(Sym->
getName());
495 if (!SymDeps.External.empty())
496 ExternalNamedSymbolDeps[SymName] = SymDeps.External;
497 if (!SymDeps.Internal.empty())
498 InternalNamedSymbolDeps[SymName] = SymDeps.Internal;
501 for (
auto &
P : Layer.Plugins) {
502 auto SynthDeps =
P->getSyntheticSymbolDependencies(*MR);
503 if (SynthDeps.empty())
507 for (
auto &KV : SynthDeps) {
508 auto &
Name = KV.first;
509 auto &DepsForName = KV.second;
510 for (
auto *Sym : DepsForName) {
511 if (Sym->
getScope() == Scope::Local) {
512 auto &BDeps = BlockDeps[Sym->
getBlock()];
513 for (
auto &S : BDeps.Internal)
514 InternalNamedSymbolDeps[
Name].insert(S);
515 for (
auto &S : BDeps.External)
516 ExternalNamedSymbolDeps[
Name].insert(S);
519 ExternalNamedSymbolDeps[
Name].insert(
520 BlockDeps.getInternedName(*Sym));
522 InternalNamedSymbolDeps[
Name].insert(
523 BlockDeps.getInternedName(*Sym));
532 BlockDependenciesMap computeBlockNonLocalDeps(
LinkGraph &
G) {
537 bool DependenciesChanged =
true;
544 for (
auto *
B :
G.blocks())
549 for (
auto *
B :
G.blocks()) {
550 auto &BI = BlockInfos[
B];
551 for (
auto &
E :
B->edges()) {
552 if (
E.getTarget().getScope() == Scope::Local &&
553 !
E.getTarget().isAbsolute()) {
554 auto &TgtB =
E.getTarget().getBlock();
556 BI.Dependencies.insert(&TgtB);
557 BlockInfos[&TgtB].Dependants.
insert(
B);
564 if (!BI.Dependants.empty() && !BI.Dependencies.empty())
569 while (!WorkList.
empty()) {
572 auto &BI = BlockInfos[
B];
573 assert(BI.DependenciesChanged &&
574 "Block in worklist has unchanged dependencies");
575 BI.DependenciesChanged =
false;
576 for (
auto *Dependant : BI.Dependants) {
577 auto &DependantBI = BlockInfos[Dependant];
578 for (
auto *Dependency : BI.Dependencies) {
579 if (Dependant != Dependency &&
580 DependantBI.Dependencies.insert(Dependency).second)
581 if (!DependantBI.DependenciesChanged) {
582 DependantBI.DependenciesChanged =
true;
590 for (
auto &KV : BlockInfos)
591 BlockDeps[KV.first] = std::move(KV.second.Dependencies);
593 return BlockDependenciesMap(Layer.getExecutionSession(),
594 std::move(BlockDeps));
598 for (
auto &NamedDepsEntry : ExternalNamedSymbolDeps) {
599 auto &
Name = NamedDepsEntry.first;
600 auto &NameDeps = NamedDepsEntry.second;
603 for (
const auto &QueryDepsEntry : QueryDeps) {
604 JITDylib &SourceJD = *QueryDepsEntry.first;
606 auto &DepsForJD = SymbolDeps[&SourceJD];
608 for (
const auto &S : Symbols)
609 if (NameDeps.count(S))
612 if (DepsForJD.empty())
613 SymbolDeps.
erase(&SourceJD);
616 MR->addDependencies(
Name, SymbolDeps);
621 std::unique_ptr<MaterializationResponsibility> MR;
622 std::unique_ptr<MemoryBuffer> ObjBuffer;
634 :
BaseT(ES), MemMgr(ES.getExecutorProcessControl().getMemMgr()) {
640 :
BaseT(ES), MemMgr(MemMgr) {
646 :
BaseT(ES), MemMgr(*MemMgr), MemMgrOwnership(
std::
move(MemMgr)) {
651 assert(Allocs.empty() &&
"Layer destroyed with resources still attached");
652 getExecutionSession().deregisterResourceManager(*
this);
656 std::unique_ptr<LinkGraph>
G) {
658 return JD.
define(LinkGraphMaterializationUnit::Create(*
this, std::move(
G)),
663 std::unique_ptr<MemoryBuffer> O) {
664 assert(O &&
"Object must not be null");
667 auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>(
668 *
this, std::move(R), std::move(O));
670 Ctx->notifyMaterializing(**
G);
671 link(std::move(*
G), std::move(Ctx));
673 Ctx->notifyFailed(
G.takeError());
678 std::unique_ptr<LinkGraph>
G) {
679 auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>(
680 *
this, std::move(R),
nullptr);
681 Ctx->notifyMaterializing(*
G);
682 link(std::move(
G), std::move(Ctx));
688 for (
auto &
P : Plugins)
689 P->modifyPassConfig(MR,
G, PassConfig);
693 for (
auto &
P : Plugins)
700 for (
auto &
P : Plugins)
701 Err =
joinErrors(std::move(Err),
P->notifyEmitted(MR));
707 [&](
ResourceKey K) { Allocs[
K].push_back(std::move(FA)); });
714 for (
auto &
P : Plugins)
715 Err =
joinErrors(std::move(Err),
P->notifyRemovingResources(JD, K));
720 std::vector<FinalizedAlloc> AllocsToRemove;
721 getExecutionSession().runSessionLocked([&] {
722 auto I = Allocs.find(K);
723 if (
I != Allocs.end()) {
724 std::swap(AllocsToRemove, I->second);
729 if (AllocsToRemove.empty())
732 return MemMgr.deallocate(std::move(AllocsToRemove));
735void ObjectLinkingLayer::handleTransferResources(
JITDylib &JD,
738 auto I = Allocs.find(SrcKey);
739 if (
I != Allocs.end()) {
740 auto &SrcAllocs =
I->second;
741 auto &DstAllocs = Allocs[DstKey];
742 DstAllocs.reserve(DstAllocs.size() + SrcAllocs.size());
743 for (
auto &
Alloc : SrcAllocs)
744 DstAllocs.push_back(std::move(
Alloc));
748 Allocs.erase(SrcKey);
751 for (
auto &
P : Plugins)
752 P->notifyTransferringResources(JD, DstKey, SrcKey);
757 : ES(ES), Registrar(
std::
move(Registrar)) {}
766 std::lock_guard<std::mutex> Lock(EHFramePluginMutex);
767 assert(!InProcessLinks.count(&MR) &&
768 "Link for MR already being tracked?");
769 InProcessLinks[&MR] = {Addr, Size};
779 std::lock_guard<std::mutex> Lock(EHFramePluginMutex);
781 auto EHFrameRangeItr = InProcessLinks.find(&MR);
782 if (EHFrameRangeItr == InProcessLinks.end())
785 EmittedRange = EHFrameRangeItr->second;
786 assert(EmittedRange.
Start &&
"eh-frame addr to register can not be null");
787 InProcessLinks.erase(EHFrameRangeItr);
791 [&](
ResourceKey K) { EHFrameRanges[K].push_back(EmittedRange); }))
794 return Registrar->registerEHFrames(EmittedRange);
799 std::lock_guard<std::mutex> Lock(EHFramePluginMutex);
800 InProcessLinks.erase(&MR);
806 std::vector<ExecutorAddrRange> RangesToRemove;
809 auto I = EHFrameRanges.find(K);
810 if (
I != EHFrameRanges.end()) {
811 RangesToRemove = std::move(I->second);
812 EHFrameRanges.erase(I);
817 while (!RangesToRemove.empty()) {
818 auto RangeToRemove = RangesToRemove.back();
819 RangesToRemove.pop_back();
820 assert(RangeToRemove.Start &&
"Untracked eh-frame range must not be null");
822 Registrar->deregisterEHFrames(RangeToRemove));
830 auto SI = EHFrameRanges.find(SrcKey);
831 if (
SI == EHFrameRanges.end())
834 auto DI = EHFrameRanges.find(DstKey);
835 if (DI != EHFrameRanges.end()) {
836 auto &SrcRanges =
SI->second;
837 auto &DstRanges = DI->second;
838 DstRanges.reserve(DstRanges.size() + SrcRanges.size());
839 for (
auto &SrcRange : SrcRanges)
840 DstRanges.push_back(std::move(SrcRange));
841 EHFrameRanges.erase(
SI);
845 auto Tmp = std::move(
SI->second);
846 EHFrameRanges.erase(
SI);
847 EHFrameRanges[DstKey] = std::move(Tmp);
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
iterator find(const_arg_type_t< KeyT > Val)
bool erase(const KeyT &Val)
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Represents a symbol that has been evaluated to an address already.
Flags for symbols in the JIT.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
An Addressable with content and edges.
Holds context for a single jitLink invocation.
Represents a finalized allocation.
Manages allocations of JIT memory.
bool isExternal() const
Returns true if the underlying addressable is an unresolved external.
bool isCallable() const
Returns true is this symbol is callable.
bool hasTargetFlags(TargetFlagsType Flags) const
Check wehther the given target flags are set for this Symbol.
StringRef getName() const
Returns the name of this symbol (empty if the symbol is anonymous).
Scope getScope() const
Get the visibility for this Symbol.
Linkage getLinkage() const
Get the linkage for this Symbol.
orc::ExecutorAddr getAddress() const
Returns the address of this symbol.
void setLive(bool IsLive)
Set this symbol's live bit.
Block & getBlock()
Return the Block for this Symbol (Symbol must be defined).
bool hasName() const
Returns true if this symbol has a name.
void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
Error notifyEmitted(MaterializationResponsibility &MR) override
Error notifyFailed(MaterializationResponsibility &MR) override
EHFrameRegistrationPlugin(ExecutionSession &ES, std::unique_ptr< jitlink::EHFrameRegistrar > Registrar)
Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &G, jitlink::PassConfiguration &PassConfig) override
An ExecutionSession represents a running JIT program.
SymbolStringPtr intern(StringRef SymName)
Add a symbol name to the SymbolStringPool and return a pointer to it.
void registerResourceManager(ResourceManager &RM)
Register the given ResourceManager with this ExecutionSession.
decltype(auto) runSessionLocked(Func &&F)
Run the given lambda with the session mutex locked.
Represents an address in the executor process.
uint64_t getValue() const
Represents a JIT'd dynamic library.
Error define(std::unique_ptr< MaterializationUnitType > &&MU, ResourceTrackerSP RT=nullptr)
Define all symbols provided by the materialization unit to be part of this JITDylib.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Error withResourceKeyDo(Func &&F) const
Runs the given callback under the session lock, passing in the associated ResourceKey.
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group,...
virtual StringRef getName() const =0
Return the name of this materialization unit.
virtual void materialize(std::unique_ptr< MaterializationResponsibility > R)=0
Implementations of this method should materialize all symbols in the materialzation unit,...
ObjectLinkingLayerJITLinkContext(ObjectLinkingLayer &Layer, std::unique_ptr< MaterializationResponsibility > MR, std::unique_ptr< MemoryBuffer > ObjBuffer)
void notifyFinalized(JITLinkMemoryManager::FinalizedAlloc A) override
Called by JITLink to notify the context that the object has been finalized (i.e.
void notifyFailed(Error Err) override
Notify this context that linking failed.
void lookup(const LookupMap &Symbols, std::unique_ptr< JITLinkAsyncLookupContinuation > LC) override
Called by JITLink to resolve external symbols.
Error notifyResolved(LinkGraph &G) override
Called by JITLink once all defined symbols in the graph have been assigned their final memory locatio...
~ObjectLinkingLayerJITLinkContext()
void notifyMaterializing(LinkGraph &G)
JITLinkMemoryManager & getMemoryManager() override
Return the MemoryManager to be used for this link.
LinkGraphPassFunction getMarkLivePass(const Triple &TT) const override
Returns the mark-live pass to be used for this link.
Error modifyPassConfig(LinkGraph &LG, PassConfiguration &Config) override
Called by JITLink to modify the pass pipeline prior to linking.
An ObjectLayer implementation built on JITLink.
ObjectLinkingLayer(ExecutionSession &ES)
Construct an ObjectLinkingLayer using the ExecutorProcessControl instance's memory manager.
Error add(ResourceTrackerSP, std::unique_ptr< jitlink::LinkGraph > G)
Add a LinkGraph to the JITDylib targeted by the given tracker.
void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override
Emit an object file.
~ObjectLinkingLayer()
Destruct an ObjectLinkingLayer.
JITDylib & getJITDylib() const
Return the JITDylib targeted by this tracker.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
SymbolLookupSet & add(SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Add an element to the set.
Pointer to a pooled string representing a symbol name.
A raw_ostream that writes to an std::string.
unique_function is a type-erasing functor similar to std::function.
LinkGraphPassFunction createEHFrameRecorderPass(const Triple &TT, StoreFrameRangeFunction StoreFrameRange)
Creates a pass that records the address and size of the EH frame section.
Expected< std::unique_ptr< LinkGraph > > createLinkGraphFromObject(MemoryBufferRef ObjectBuffer)
Create a LinkGraph from the given object buffer.
void link(std::unique_ptr< LinkGraph > G, std::unique_ptr< JITLinkContext > Ctx)
Link the given graph.
std::vector< std::pair< JITDylib *, JITDylibLookupFlags > > JITDylibSearchOrder
A list of (JITDylib*, JITDylibLookupFlags) pairs to be used as a search order during symbol lookup.
SymbolLookupFlags
Lookup flags that apply to each symbol in a lookup.
bool isMachOInitializerSection(StringRef SegName, StringRef SecName)
std::vector< SymbolStringPtr > SymbolNameVector
A vector of symbol names.
@ Resolved
Queried, materialization begun.
bool isELFInitializerSection(StringRef SecName)
This is an optimization pass for GlobalISel generic memory operations.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes...
LinkGraphPassList PostFixupPasses
Post-fixup passes.
LinkGraphPassList PostPrunePasses
Post-prune passes.
LinkGraphPassList PrePrunePasses
Pre-prune passes.
Represents an address range in the exceutor process.