LLVM: lib/ExecutionEngine/Orc/EHFrameRegistrationPlugin.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
10
14
15#define DEBUG_TYPE "orc"
16
18
20
21Expected<std::unique_ptr>
23
24
25 ExecutorAddr RegisterEHFrameSectionAllocAction;
26 ExecutorAddr DeregisterEHFrameSectionAllocAction;
28 {{RegisterEHFrameSectionAllocAction,
29 rt::RegisterEHFrameSectionAllocActionName},
30 {DeregisterEHFrameSectionAllocAction,
31 rt::DeregisterEHFrameSectionAllocActionName}}))
32 return std::move(Err);
33
34 return std::make_unique(
35 RegisterEHFrameSectionAllocAction, DeregisterEHFrameSectionAllocAction);
36}
37
44 if (auto *CUSec = G.findSectionByName(MachOCompactUnwindSectionName))
45 G.removeSection(*CUSec);
46 return Error::success();
47 });
48
51 using namespace shared;
53 G.allocActions().push_back(
55 WrapperFunctionCall::Create<SPSArgList>(
56 RegisterEHFrame, R)),
58 WrapperFunctionCall::Create<SPSArgList>(
59 DeregisterEHFrame, R))});
60 }
62 });
63}
64
65}
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)
Definition EHFrameRegistrationPlugin.cpp:22
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &G, jitlink::PassConfiguration &PassConfig) override
Definition EHFrameRegistrationPlugin.cpp:38
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.