summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
index c531df82446..b54fd378aa5 100644
--- a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
@@ -507,8 +507,9 @@ Error deregisterEHFrameSection(const void *EHFrameSectionAddr) {
#endif
}
-AtomGraphPassFunction createEHFrameRecorderPass(const Triple &TT,
- JITTargetAddress &EHFrameAddr) {
+AtomGraphPassFunction
+createEHFrameRecorderPass(const Triple &TT,
+ StoreFrameAddressFunction StoreFrameAddress) {
const char *EHFrameSectionName = nullptr;
if (TT.getObjectFormat() == Triple::MachO)
EHFrameSectionName = "__eh_frame";
@@ -516,7 +517,7 @@ AtomGraphPassFunction createEHFrameRecorderPass(const Triple &TT,
EHFrameSectionName = ".eh_frame";
auto RecordEHFrame = [EHFrameSectionName,
- &EHFrameAddr](AtomGraph &G) -> Error {
+ StoreFrameAddress](AtomGraph &G) -> Error {
// Search for a non-empty eh-frame and record the address of the first atom
// in it.
JITTargetAddress Addr = 0;
@@ -529,7 +530,7 @@ AtomGraphPassFunction createEHFrameRecorderPass(const Triple &TT,
break;
}
- EHFrameAddr = Addr;
+ StoreFrameAddress(Addr);
return Error::success();
};
OpenPOWER on IntegriCloud