diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-20 17:24:08 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-20 17:24:08 +0000 |
commit | 6514551be704adb577682148ca825c08fd642329 (patch) | |
tree | eaba4495339d85991fac14581605452a6657d249 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 2e8e5c0eca6f34a94f92824fc713afd6dc329e25 (diff) |
Plug a leak when using MCJIT.
Found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 313d362d94..30963a2ea9 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -273,7 +273,7 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, // Create the code emitter for the target if it exists. If not, .o file // emission fails. - const MCRegisterInfo &MRI = *getTarget().createMCRegInfo(getTargetTriple()); + const MCRegisterInfo &MRI = *getRegisterInfo(); const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>(); MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI, *Ctx); |