aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/MCJIT/MCJIT.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-03-23 21:35:02 +0000
committerJim Grosbach <grosbach@apple.com>2011-03-23 21:35:02 +0000
commit66978bd81c8f3dc87ced049e2577b98a399d72bc (patch)
treecd9493bb6bda4f35fc26a028a4af65d632edb6a6 /lib/ExecutionEngine/MCJIT/MCJIT.cpp
parent7614783f2dbf1090c3a4888bc70e1eb2baee37c4 (diff)
downloadexternal_llvm-66978bd81c8f3dc87ced049e2577b98a399d72bc.zip
external_llvm-66978bd81c8f3dc87ced049e2577b98a399d72bc.tar.gz
external_llvm-66978bd81c8f3dc87ced049e2577b98a399d72bc.tar.bz2
Fix double-free of Module.
The ExecutionEngine constructor already added the module, so there's no need to call addModule() directly. Doing so causes a double-free of the Module at program termination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index faed7a6..f3e6087 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -78,7 +78,6 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji,
}
// Initialize passes.
- ExecutionEngine::addModule(M);
// FIXME: When we support multiple modules, we'll want to move the code
// gen and finalization out of the constructor here and do it more
// on-demand as part of getPointerToFunction().