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
This commit is contained in:
parent
c72a807039
commit
3fa6dcfebb
|
@ -85,6 +85,7 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji,
|
||||||
|
|
||||||
MCJIT::~MCJIT() {
|
MCJIT::~MCJIT() {
|
||||||
delete MemMgr;
|
delete MemMgr;
|
||||||
|
delete TM;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) {
|
void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) {
|
||||||
|
|
Loading…
Reference in New Issue