diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-01-17 23:08:46 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-01-17 23:08:46 +0000 |
commit | 3fa6dcfebb2c5f7bc4edc95d7cc7143ccc53d514 (patch) | |
tree | 2d70ab77b887705ec286c08cd765eb2b72f230ac /llvm/lib/ExecutionEngine | |
parent | c72a807039a2926168992679cd211b286b0a2412 (diff) | |
download | bcm5719-llvm-3fa6dcfebb2c5f7bc4edc95d7cc7143ccc53d514.tar.gz bcm5719-llvm-3fa6dcfebb2c5f7bc4edc95d7cc7143ccc53d514.zip |
Fix MCJIT memory leak of owned TargetMachine.
The JIT is expected to take ownership of the TM that's passed in. The MCJIT
wasn't freeing it, resulting in leaks.
llvm-svn: 148356
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index d5aaec9333b..a0280b7c79f 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -85,6 +85,7 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji, MCJIT::~MCJIT() { delete MemMgr; + delete TM; } void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) { |