[Lldb-commits] [lldb] r198177 - Stop leaking MCRegisterInfo.
Jean-Daniel Dupas
devlists at shadowlab.org
Sun Dec 29 12:17:26 PST 2013
Author: jddupas
Date: Sun Dec 29 14:17:26 2013
New Revision: 198177
URL: http://llvm.org/viewvc/llvm-project?rev=198177&view=rev
Log:
Stop leaking MCRegisterInfo.
Modified:
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=198177&r1=198176&r2=198177&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Sun Dec 29 14:17:26 2013
@@ -435,7 +435,8 @@ DisassemblerLLVMC::LLVMCDisassembler::LL
m_subtarget_info_ap.reset(curr_target->createMCSubtargetInfo(triple, "",
features_str));
- m_asm_info_ap.reset(curr_target->createMCAsmInfo(*curr_target->createMCRegInfo(triple), triple));
+ std::unique_ptr<llvm::MCRegisterInfo> reg_info(curr_target->createMCRegInfo(triple));
+ m_asm_info_ap.reset(curr_target->createMCAsmInfo(*reg_info, triple));
if (m_instr_info_ap.get() == NULL || m_reg_info_ap.get() == NULL || m_subtarget_info_ap.get() == NULL || m_asm_info_ap.get() == NULL)
{
More information about the lldb-commits
mailing list