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()) {
56 if (Sym.
getScope() == Scope::Default)
67 static std::unique_ptr<LinkGraphMaterializationUnit>
69 auto LGI = scanLinkGraph(ObjLinkingLayer.getExecutionSession(), *
G);
70 return std::unique_ptr<LinkGraphMaterializationUnit>(
71 new LinkGraphMaterializationUnit(ObjLinkingLayer, std::move(
G),
76 void materialize(std::unique_ptr<MaterializationResponsibility> MR)
override {
77 ObjLinkingLayer.
emit(std::move(MR), std::move(
G));
85 for (
auto *Sym :
G.defined_symbols()) {
92 getJITSymbolFlagsForSymbol(*Sym);
95 if (hasInitializerSection(
G))
96 LGI.InitSymbol = makeInitSymbol(ES,
G);
102 std::string InitSymString;
104 <<
"$." <<
G.getName() <<
".__inits" << Counter++;
105 return ES.
intern(InitSymString);
109 std::unique_ptr<LinkGraph>
G, Interface LGI)
114 for (
auto *Sym :
G->defined_symbols())
117 "Discarding non-weak definition");
118 G->makeExternal(*Sym);
124 std::unique_ptr<LinkGraph>
G;
125 static std::atomic<uint64_t> Counter;
128std::atomic<uint64_t> LinkGraphMaterializationUnit::Counter{0};
139 std::unique_ptr<MaterializationResponsibility> MR,
140 std::unique_ptr<MemoryBuffer> ObjBuffer)
147 if (Layer.ReturnObjectBuffer && ObjBuffer)
148 Layer.ReturnObjectBuffer(std::move(ObjBuffer));
154 for (
auto &
P : Layer.Plugins)
155 P->notifyMaterializing(*MR,
G, *
this,
156 ObjBuffer ? ObjBuffer->getMemBufferRef()
161 for (
auto &
P : Layer.Plugins)
162 Err =
joinErrors(std::move(Err),
P->notifyFailed(*MR));
163 Layer.getExecutionSession().reportError(std::move(Err));
164 MR->failMaterialization();
168 std::unique_ptr<JITLinkAsyncLookupContinuation> LC)
override {
171 MR->getTargetJITDylib().withLinkOrderDo(
174 auto &ES = Layer.getExecutionSession();
177 for (
auto &KV : Symbols) {
187 LookupSet.
add(ES.intern(KV.first), LookupFlags);
191 auto OnResolve = [LookupContinuation =
194 LookupContinuation->run(
Result.takeError());
198 LR[*KV.first] = KV.second;
199 LookupContinuation->run(std::move(LR));
203 for (
auto &KV : InternalNamedSymbolDeps) {
205 InternalDeps[&MR->getTargetJITDylib()] = std::move(KV.second);
206 MR->addDependencies(KV.first, InternalDeps);
212 registerDependencies(Deps);
217 auto &ES = Layer.getExecutionSession();
220 bool AutoClaim = Layer.AutoClaimObjectSymbols;
223 for (
auto *Sym :
G.defined_symbols())
224 if (Sym->hasName() && Sym->getScope() != Scope::Local) {
225 auto InternedName = ES.intern(Sym->getName());
226 auto Ptr = getJITSymbolPtrForSymbol(*Sym);
227 auto Flags = getJITSymbolFlagsForSymbol(*Sym);
229 if (AutoClaim && !MR->getSymbols().count(InternedName)) {
231 "Duplicate symbol to claim?");
232 ExtraSymbolsToClaim[InternedName] =
Flags;
236 for (
auto *Sym :
G.absolute_symbols())
237 if (Sym->hasName() && Sym->getScope() != Scope::Local) {
238 auto InternedName = ES.intern(Sym->getName());
239 auto Ptr = getJITSymbolPtrForSymbol(*Sym);
240 auto Flags = getJITSymbolFlagsForSymbol(*Sym);
242 if (AutoClaim && !MR->getSymbols().count(InternedName)) {
244 "Duplicate symbol to claim?");
245 ExtraSymbolsToClaim[InternedName] =
Flags;
249 if (!ExtraSymbolsToClaim.
empty())
250 if (
auto Err = MR->defineMaterializing(ExtraSymbolsToClaim))
260 size_t NumMaterializationSideEffectsOnlySymbols = 0;
263 for (
auto &KV : MR->getSymbols()) {
265 auto I = InternedResult.
find(KV.first);
270 if (KV.second.hasMaterializationSideEffectsOnly()) {
271 ++NumMaterializationSideEffectsOnlySymbols;
272 if (
I != InternedResult.
end())
273 ExtraSymbols.push_back(KV.first);
275 }
else if (
I == InternedResult.
end())
276 MissingSymbols.push_back(KV.first);
277 else if (Layer.OverrideObjectFlags)
278 I->second.setFlags(KV.second);
282 if (!MissingSymbols.empty())
283 return make_error<MissingSymbolDefinitions>(
284 Layer.getExecutionSession().getSymbolStringPool(),
G.getName(),
285 std::move(MissingSymbols));
289 if (InternedResult.
size() >
290 MR->getSymbols().size() - NumMaterializationSideEffectsOnlySymbols) {
291 for (
auto &KV : InternedResult)
292 if (!MR->getSymbols().count(KV.first))
293 ExtraSymbols.push_back(KV.first);
297 if (!ExtraSymbols.empty())
298 return make_error<UnexpectedSymbolDefinitions>(
299 Layer.getExecutionSession().getSymbolStringPool(),
G.getName(),
300 std::move(ExtraSymbols));
303 if (
auto Err = MR->notifyResolved(InternedResult))
306 Layer.notifyLoaded(*MR);
311 if (
auto Err = Layer.notifyEmitted(*MR, std::move(
A))) {
312 Layer.getExecutionSession().reportError(std::move(Err));
313 MR->failMaterialization();
316 if (
auto Err = MR->notifyEmitted()) {
317 Layer.getExecutionSession().reportError(std::move(Err));
318 MR->failMaterialization();
323 return [
this](
LinkGraph &
G) {
return markResponsibilitySymbolsLive(
G); };
330 return claimOrExternalizeWeakAndCommonSymbols(
G);
333 Layer.modifyPassConfig(*MR, LG, Config);
336 [
this](
LinkGraph &
G) {
return computeNamedSymbolDependencies(
G); });
345 struct BlockSymbolDependencies {
350 class BlockDependenciesMap {
354 : ES(ES), BlockDeps(
std::
move(BlockDeps)) {}
356 const BlockSymbolDependencies &operator[](
const Block &
B) {
358 auto I = BlockTransitiveDepsCache.find(&
B);
359 if (
I != BlockTransitiveDepsCache.end())
363 BlockSymbolDependencies BTDCacheVal;
364 auto BDI = BlockDeps.find(&
B);
365 assert(BDI != BlockDeps.end() &&
"No block dependencies");
367 for (
auto *BDep : BDI->second) {
368 auto &BID = getBlockImmediateDeps(*BDep);
369 for (
auto &ExternalDep : BID.External)
370 BTDCacheVal.External.insert(ExternalDep);
371 for (
auto &InternalDep : BID.Internal)
372 BTDCacheVal.Internal.insert(InternalDep);
375 return BlockTransitiveDepsCache
376 .insert(std::make_pair(&
B, std::move(BTDCacheVal)))
381 auto I = NameCache.find(&Sym);
382 if (
I != NameCache.end())
385 return NameCache.insert(std::make_pair(&Sym, ES.intern(Sym.
getName())))
390 BlockSymbolDependencies &getBlockImmediateDeps(
Block &
B) {
392 auto I = BlockImmediateDepsCache.find(&
B);
393 if (
I != BlockImmediateDepsCache.end())
396 BlockSymbolDependencies BIDCacheVal;
397 for (
auto &
E :
B.edges()) {
398 auto &Tgt =
E.getTarget();
399 if (Tgt.getScope() != Scope::Local) {
400 if (Tgt.isExternal())
401 BIDCacheVal.External.insert(getInternedName(Tgt));
403 BIDCacheVal.Internal.insert(getInternedName(Tgt));
407 return BlockImmediateDepsCache
408 .insert(std::make_pair(&
B, std::move(BIDCacheVal)))
420 auto &ES = Layer.getExecutionSession();
423 std::vector<std::pair<SymbolStringPtr, Symbol *>> NameToSym;
425 auto ProcessSymbol = [&](
Symbol *Sym) {
429 if (!MR->getSymbols().count(ES.intern(Sym->
getName()))) {
430 NewSymbolsToClaim[
Name] =
432 NameToSym.push_back(std::make_pair(std::move(
Name), Sym));
437 for (
auto *Sym :
G.defined_symbols())
439 for (
auto *Sym :
G.absolute_symbols())
445 cantFail(MR->defineMaterializing(std::move(NewSymbolsToClaim)));
450 for (
auto &KV : NameToSym) {
451 if (MR->getSymbols().count(KV.first))
452 KV.second->setLive(
true);
454 G.makeExternal(*KV.second);
461 auto &ES = Layer.getExecutionSession();
462 for (
auto *Sym :
G.defined_symbols())
463 if (Sym->
hasName() && MR->getSymbols().count(ES.intern(Sym->
getName())))
469 auto &ES = MR->getTargetJITDylib().getExecutionSession();
470 auto BlockDeps = computeBlockNonLocalDeps(
G);
473 for (
auto *Sym :
G.defined_symbols()) {
476 if (Sym->
getScope() == Scope::Local)
479 "Defined non-local jitlink::Symbol should have a name");
481 auto &SymDeps = BlockDeps[Sym->
getBlock()];
482 if (SymDeps.External.empty() && SymDeps.Internal.empty())
485 auto SymName = ES.intern(Sym->
getName());
486 if (!SymDeps.External.empty())
487 ExternalNamedSymbolDeps[SymName] = SymDeps.External;
488 if (!SymDeps.Internal.empty())
489 InternalNamedSymbolDeps[SymName] = SymDeps.Internal;
492 for (
auto &
P : Layer.Plugins) {
493 auto SynthDeps =
P->getSyntheticSymbolDependencies(*MR);
494 if (SynthDeps.empty())
498 for (
auto &KV : SynthDeps) {
499 auto &
Name = KV.first;
500 auto &DepsForName = KV.second;
501 for (
auto *Sym : DepsForName) {
502 if (Sym->
getScope() == Scope::Local) {
503 auto &BDeps = BlockDeps[Sym->
getBlock()];
504 for (
auto &S : BDeps.Internal)
505 InternalNamedSymbolDeps[
Name].insert(S);
506 for (
auto &S : BDeps.External)
507 ExternalNamedSymbolDeps[
Name].insert(S);
510 ExternalNamedSymbolDeps[
Name].insert(
511 BlockDeps.getInternedName(*Sym));
513 InternalNamedSymbolDeps[
Name].insert(
514 BlockDeps.getInternedName(*Sym));
523 BlockDependenciesMap computeBlockNonLocalDeps(
LinkGraph &
G) {
528 bool DependenciesChanged =
true;
535 for (
auto *
B :
G.blocks())
540 for (
auto *
B :
G.blocks()) {
541 auto &BI = BlockInfos[
B];
542 for (
auto &
E :
B->edges()) {
543 if (
E.getTarget().getScope() == Scope::Local &&
544 !
E.getTarget().isAbsolute()) {
545 auto &TgtB =
E.getTarget().getBlock();
547 BI.Dependencies.insert(&TgtB);
548 BlockInfos[&TgtB].Dependants.
insert(
B);
555 if (!BI.Dependants.empty() && !BI.Dependencies.empty())
560 while (!WorkList.
empty()) {
563 auto &BI = BlockInfos[
B];
564 assert(BI.DependenciesChanged &&
565 "Block in worklist has unchanged dependencies");
566 BI.DependenciesChanged =
false;
567 for (
auto *Dependant : BI.Dependants) {
568 auto &DependantBI = BlockInfos[Dependant];
569 for (
auto *Dependency : BI.Dependencies) {
570 if (Dependant != Dependency &&
571 DependantBI.Dependencies.insert(Dependency).second)
572 if (!DependantBI.DependenciesChanged) {
573 DependantBI.DependenciesChanged =
true;
581 for (
auto &KV : BlockInfos)
582 BlockDeps[KV.first] = std::move(KV.second.Dependencies);
584 return BlockDependenciesMap(Layer.getExecutionSession(),
585 std::move(BlockDeps));
589 for (
auto &NamedDepsEntry : ExternalNamedSymbolDeps) {
590 auto &
Name = NamedDepsEntry.first;
591 auto &NameDeps = NamedDepsEntry.second;
594 for (
const auto &QueryDepsEntry : QueryDeps) {
595 JITDylib &SourceJD = *QueryDepsEntry.first;
597 auto &DepsForJD = SymbolDeps[&SourceJD];
599 for (
const auto &S : Symbols)
600 if (NameDeps.count(S))
603 if (DepsForJD.empty())
604 SymbolDeps.
erase(&SourceJD);
607 MR->addDependencies(
Name, SymbolDeps);
612 std::unique_ptr<MaterializationResponsibility> MR;
613 std::unique_ptr<MemoryBuffer> ObjBuffer;
625 :
BaseT(ES), MemMgr(ES.getExecutorProcessControl().getMemMgr()) {
631 :
BaseT(ES), MemMgr(MemMgr) {
637 :
BaseT(ES), MemMgr(*MemMgr), MemMgrOwnership(
std::
move(MemMgr)) {
642 assert(Allocs.empty() &&
"Layer destroyed with resources still attached");
643 getExecutionSession().deregisterResourceManager(*
this);
647 std::unique_ptr<LinkGraph>
G) {
649 return JD.
define(LinkGraphMaterializationUnit::Create(*
this, std::move(
G)),
654 std::unique_ptr<MemoryBuffer> O) {
655 assert(O &&
"Object must not be null");
658 auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>(
659 *
this, std::move(R), std::move(O));
661 Ctx->notifyMaterializing(**
G);
662 link(std::move(*
G), std::move(Ctx));
664 Ctx->notifyFailed(
G.takeError());
669 std::unique_ptr<LinkGraph>
G) {
670 auto Ctx = std::make_unique<ObjectLinkingLayerJITLinkContext>(
671 *
this, std::move(R),
nullptr);
672 Ctx->notifyMaterializing(*
G);
673 link(std::move(
G), std::move(Ctx));
679 for (
auto &
P : Plugins)
680 P->modifyPassConfig(MR,
G, PassConfig);
684 for (
auto &
P : Plugins)
691 for (
auto &
P : Plugins)
692 Err =
joinErrors(std::move(Err),
P->notifyEmitted(MR));
698 [&](
ResourceKey K) { Allocs[
K].push_back(std::move(FA)); });
705 for (
auto &
P : Plugins)
706 Err =
joinErrors(std::move(Err),
P->notifyRemovingResources(JD, K));
711 std::vector<FinalizedAlloc> AllocsToRemove;
712 getExecutionSession().runSessionLocked([&] {
713 auto I = Allocs.find(K);
714 if (
I != Allocs.end()) {
715 std::swap(AllocsToRemove, I->second);
720 if (AllocsToRemove.empty())
723 return MemMgr.deallocate(std::move(AllocsToRemove));
726void ObjectLinkingLayer::handleTransferResources(
JITDylib &JD,
729 auto I = Allocs.find(SrcKey);
730 if (
I != Allocs.end()) {
731 auto &SrcAllocs =
I->second;
732 auto &DstAllocs = Allocs[DstKey];
733 DstAllocs.reserve(DstAllocs.size() + SrcAllocs.size());
734 for (
auto &
Alloc : SrcAllocs)
735 DstAllocs.push_back(std::move(
Alloc));
739 Allocs.erase(SrcKey);
742 for (
auto &
P : Plugins)
743 P->notifyTransferringResources(JD, DstKey, SrcKey);
748 : ES(ES), Registrar(
std::
move(Registrar)) {}
757 std::lock_guard<std::mutex> Lock(EHFramePluginMutex);
758 assert(!InProcessLinks.count(&MR) &&
759 "Link for MR already being tracked?");
760 InProcessLinks[&MR] = {Addr, Size};
770 std::lock_guard<std::mutex> Lock(EHFramePluginMutex);
772 auto EHFrameRangeItr = InProcessLinks.find(&MR);
773 if (EHFrameRangeItr == InProcessLinks.end())
776 EmittedRange = EHFrameRangeItr->second;
777 assert(EmittedRange.
Start &&
"eh-frame addr to register can not be null");
778 InProcessLinks.erase(EHFrameRangeItr);
782 [&](
ResourceKey K) { EHFrameRanges[K].push_back(EmittedRange); }))
785 return Registrar->registerEHFrames(EmittedRange);
790 std::lock_guard<std::mutex> Lock(EHFramePluginMutex);
791 InProcessLinks.erase(&MR);
797 std::vector<ExecutorAddrRange> RangesToRemove;
800 auto I = EHFrameRanges.find(K);
801 if (
I != EHFrameRanges.end()) {
802 RangesToRemove = std::move(I->second);
803 EHFrameRanges.erase(I);
808 while (!RangesToRemove.empty()) {
809 auto RangeToRemove = RangesToRemove.back();
810 RangesToRemove.pop_back();
811 assert(RangeToRemove.Start &&
"Untracked eh-frame range must not be null");
813 Registrar->deregisterEHFrames(RangeToRemove));
821 auto SI = EHFrameRanges.find(SrcKey);
822 if (
SI == EHFrameRanges.end())
825 auto DI = EHFrameRanges.find(DstKey);
826 if (DI != EHFrameRanges.end()) {
827 auto &SrcRanges =
SI->second;
828 auto &DstRanges = DI->second;
829 DstRanges.reserve(DstRanges.size() + SrcRanges.size());
830 for (
auto &SrcRange : SrcRanges)
831 DstRanges.push_back(std::move(SrcRange));
832 EHFrameRanges.erase(
SI);
836 auto Tmp = std::move(
SI->second);
837 EHFrameRanges.erase(
SI);
838 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.