projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bd2ae9
)
Fix MCJIT memory leak of owned TargetMachine.
author
Jim Grosbach
<grosbach@apple.com>
Tue, 17 Jan 2012 23:08:46 +0000
(23:08 +0000)
committer
Jim Grosbach
<grosbach@apple.com>
Tue, 17 Jan 2012 23:08:46 +0000
(23:08 +0000)
The JIT is expected to take ownership of the TM that's passed in. The MCJIT
wasn't freeing it, resulting in leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148356
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/ExecutionEngine/MCJIT/MCJIT.cpp
patch
|
blob
|
history
diff --git
a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index d5aaec9333b1efd73a774112b020dfbed58de2cf..a0280b7c79f10e8148949afd4fc150c346a3f155 100644
(file)
--- a/
lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/
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) {