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:
Jim Grosbach 2012-01-17 23:08:46 +00:00
parent c72a807039
commit 3fa6dcfebb
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji,
MCJIT::~MCJIT() {
delete MemMgr;
delete TM;
}
void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) {