16#define DEBUG_TYPE "orc"
22Expected<std::unique_ptr<EHFrameRegistrationPlugin>>
30 {recordAddr(rt::RegisterEHFrameSectionAllocActionName,
31 &RegisterEHFrameSectionAllocAction),
32 recordAddr(rt::DeregisterEHFrameSectionAllocActionName,
33 &DeregisterEHFrameSectionAllocAction)}))
34 return std::move(Err);
36 return std::make_unique<EHFrameRegistrationPlugin>(
37 RegisterEHFrameSectionAllocAction, DeregisterEHFrameSectionAllocAction);
46 if (auto *CUSec = G.findSectionByName(MachOCompactUnwindSectionName))
47 G.removeSection(*CUSec);
48 return Error::success();
55 G.allocActions().push_back(
57 WrapperFunctionCall::Create<SPSArgList<SPSExecutorAddrRange>>(
60 WrapperFunctionCall::Create<SPSArgList<SPSExecutorAddrRange>>(
61 DeregisterEHFrame, R))});
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
const Triple & getTargetTriple() const
Returns the target triple for this Graph.
Represents a section address range via a pair of Block pointers to the first and last Blocks in the s...
orc::ExecutorAddrRange getRange() const
static Expected< std::unique_ptr< EHFrameRegistrationPlugin > > Create(ExecutionSession &ES)
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &G, jitlink::PassConfiguration &PassConfig) override
An ExecutionSession represents a running JIT program.
JITDylib & getBootstrapJITDylib()
Returns a reference to the bootstrap JITDylib.
Represents an address in the executor process.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
LLVM_ABI Section * getEHFrameSection(LinkGraph &G)
Returns a pointer to the DWARF eh-frame section if the graph contains a non-empty one,...
LLVM_ABI void lookupAndApply(unique_function< void(Error)> OnApplied, LookupKind K, const JITDylibSearchOrder &SearchOrder, ArrayRef< LookupPrepareFn > PrepareFns)
Resolve the symbols contributed by every prepare function with a single lookup, then let each of thei...
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes...
LinkGraphPassList PostFixupPasses
Post-fixup passes.
LinkGraphPassList PrePrunePasses
Pre-prune passes.