summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-03-04 23:37:39 +0000
committerEric Christopher <echristo@apple.com>2011-03-04 23:37:39 +0000
commit515c67ee77f8d9c417efc0fe04615d269bfb70e4 (patch)
treed726d694ca4f98a852095be1e4af9fcef0bdff67 /lib/ExecutionEngine/JIT
parentb1939d5db6f95f18c9898861c58d2eac6456f06b (diff)
downloadllvm-515c67ee77f8d9c417efc0fe04615d269bfb70e4.tar.gz
llvm-515c67ee77f8d9c417efc0fe04615d269bfb70e4.tar.bz2
llvm-515c67ee77f8d9c417efc0fe04615d269bfb70e4.tar.xz
Support unregistering exception frames of functions when they are removed.
Patch by Johannes Schaub! Fixes PR8548 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 4cd8757ad0..fa3c5a01c1 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -985,7 +985,7 @@ bool JITEmitter::finishFunction(MachineFunction &F) {
CurBufferPtr = SavedCurBufferPtr;
if (JITExceptionHandling) {
- TheJIT->RegisterTable(FrameRegister);
+ TheJIT->RegisterTable(F.getFunction(), FrameRegister);
}
if (JITEmitDebugInfo) {
@@ -1033,8 +1033,9 @@ void JITEmitter::deallocateMemForFunction(const Function *F) {
EmittedFunctions.erase(Emitted);
}
- // TODO: Do we need to unregister exception handling information from libgcc
- // here?
+ if(JITExceptionHandling) {
+ TheJIT->DeregisterTable(F);
+ }
if (JITEmitDebugInfo) {
DR->UnregisterFunction(F);