15#define DEBUG_TYPE "orc"
28 {{RegisterEHFrameSectionAllocAction,
29 rt::RegisterEHFrameSectionAllocActionName},
30 {DeregisterEHFrameSectionAllocAction,
31 rt::DeregisterEHFrameSectionAllocActionName}}))
32 return std::move(Err);
34 return std::make_unique<EHFrameRegistrationPlugin>(
35 RegisterEHFrameSectionAllocAction, DeregisterEHFrameSectionAllocAction);
38void EHFrameRegistrationPlugin::modifyPassConfig(
44 if (auto *CUSec = G.findSectionByName(MachOCompactUnwindSectionName))
45 G.removeSection(*CUSec);
46 return Error::success();
51 using namespace shared;
53 G.allocActions().push_back(
55 WrapperFunctionCall::Create<SPSArgList<SPSExecutorAddrRange>>(
58 WrapperFunctionCall::Create<SPSArgList<SPSExecutorAddrRange>>(
59 DeregisterEHFrame, R))});
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.
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)
An ExecutionSession represents a running JIT program.
ExecutorProcessControl & getExecutorProcessControl()
Get the ExecutorProcessControl object associated with this ExecutionSession.
Represents an address in the executor process.
Error getBootstrapSymbols(ArrayRef< std::pair< ExecutorAddr &, StringRef > > Pairs) const
For each (ExecutorAddr&, StringRef) pair, looks up the string in the bootstrap symbols map and writes...
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,...
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.