summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-10-21 08:57:29 +0000
committerDuncan Sands <baldrick@free.fr>2010-10-21 08:57:29 +0000
commitabc7901e4e74e5561d4a7a31fc8af05d0c73b6a3 (patch)
treea149bdbd8456661abc280e79ed88753ed55e7dd0 /llvm/lib/ExecutionEngine/ExecutionEngine.cpp
parent54bf3c3cfb1f5d73dd91055f377b10404789a408 (diff)
downloadbcm5719-llvm-abc7901e4e74e5561d4a7a31fc8af05d0c73b6a3.tar.gz
bcm5719-llvm-abc7901e4e74e5561d4a7a31fc8af05d0c73b6a3.zip
Fix the cleanup process of exception information in JIT. Now JIT
deregisters registered by it FDE structures allowing consecutive JIT runs to succeed. Patch by Yuri. Fixes PR8285. llvm-svn: 117004
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index be7f1f56a95..77082c4d041 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -47,12 +47,12 @@ ExecutionEngine *(*ExecutionEngine::JITCtor)(
const SmallVectorImpl<std::string>& MAttrs) = 0;
ExecutionEngine *(*ExecutionEngine::InterpCtor)(Module *M,
std::string *ErrorStr) = 0;
-ExecutionEngine::EERegisterFn ExecutionEngine::ExceptionTableRegister = 0;
-
ExecutionEngine::ExecutionEngine(Module *M)
: EEState(*this),
- LazyFunctionCreator(0) {
+ LazyFunctionCreator(0),
+ ExceptionTableRegister(0),
+ ExceptionTableDeregister(0) {
CompilingLazily = false;
GVCompilationDisabled = false;
SymbolSearchingDisabled = false;
@@ -66,6 +66,16 @@ ExecutionEngine::~ExecutionEngine() {
delete Modules[i];
}
+void ExecutionEngine::DeregisterAllTables() {
+ if (ExceptionTableDeregister) {
+ std::vector<void*>::iterator it = AllExceptionTables.begin();
+ std::vector<void*>::iterator ite = AllExceptionTables.end();
+ for (; it != ite; ++it)
+ ExceptionTableDeregister(*it);
+ AllExceptionTables.clear();
+ }
+}
+
namespace {
// This class automatically deletes the memory block when the GlobalVariable is
// destroyed.
OpenPOWER on IntegriCloud