summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-10-11 21:25:48 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-10-11 21:25:48 +0000
commit7bb1344c67dd437a4324be90110c4e714a4b4de0 (patch)
tree3c1250198de7402b8cf3715bc05440e6937341c2 /llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
parent71814b44658523f5fc747475ad8b40c9197565e2 (diff)
downloadbcm5719-llvm-7bb1344c67dd437a4324be90110c4e714a4b4de0.tar.gz
bcm5719-llvm-7bb1344c67dd437a4324be90110c4e714a4b4de0.zip
Adding multiple object support to MCJIT EH frame handling
llvm-svn: 192504
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 541ba9eb62b..fa2c9842d9e 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -178,14 +178,12 @@ void MCJIT::finalizeLoadedModules() {
if (ModuleStates[M].hasBeenLoaded() &&
!ModuleStates[M].hasBeenFinalized()) {
- // FIXME: This should be module specific!
- StringRef EHData = Dyld.getEHFrameSection();
- if (!EHData.empty())
- MemMgr.registerEHFrames(EHData);
ModuleStates[M] = ModuleFinalized;
}
}
+ Dyld.registerEHFrames();
+
// Set page permissions.
MemMgr.finalizeMemory();
}
@@ -221,14 +219,12 @@ void MCJIT::finalizeObject() {
if (ModuleStates[M].hasBeenLoaded() &&
!ModuleStates[M].hasBeenFinalized()) {
- // FIXME: This should be module specific!
- StringRef EHData = Dyld.getEHFrameSection();
- if (!EHData.empty())
- MemMgr.registerEHFrames(EHData);
ModuleStates[M] = ModuleFinalized;
}
}
+ Dyld.registerEHFrames();
+
// Set page permissions.
MemMgr.finalizeMemory();
}
@@ -248,10 +244,7 @@ void MCJIT::finalizeModule(Module *M) {
// Resolve any outstanding relocations.
Dyld.resolveRelocations();
- // FIXME: Should this be module specific?
- StringRef EHData = Dyld.getEHFrameSection();
- if (!EHData.empty())
- MemMgr.registerEHFrames(EHData);
+ Dyld.registerEHFrames();
// Set page permissions.
MemMgr.finalizeMemory();
OpenPOWER on IntegriCloud