This revision was automatically updated to reflect the committed changes. Closed by commit rL323085: Fix memory leaks in MinidumpParserTest (authored by teemperor, committed by ). Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D42347?vs=130846&id=130847#toc Repository: rL LLVM https://reviews.llvm.org/D42347 Files: lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp Index: lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp =================================================================== --- lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp +++ lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp @@ -315,9 +315,9 @@ llvm::ArrayRef<uint8_t> registers(parser->GetThreadContext(thread)); ArchSpec arch = parser->GetArchitecture(); - RegisterInfoInterface *reg_interface = new RegisterContextLinux_i386(arch); + auto reg_interface = llvm::make_unique<RegisterContextLinux_i386>(arch); lldb::DataBufferSP buf = - ConvertMinidumpContext_x86_32(registers, reg_interface); + ConvertMinidumpContext_x86_32(registers, reg_interface.get()); ASSERT_EQ(reg_interface->GetGPRSize(), buf->GetByteSize()); const RegisterInfo *reg_info = reg_interface->GetRegisterInfo(); @@ -357,9 +357,9 @@ llvm::ArrayRef<uint8_t> registers(parser->GetThreadContext(thread)); ArchSpec arch = parser->GetArchitecture(); - RegisterInfoInterface *reg_interface = new RegisterContextLinux_x86_64(arch); + auto reg_interface = llvm::make_unique<RegisterContextLinux_x86_64>(arch); lldb::DataBufferSP buf = - ConvertMinidumpContext_x86_64(registers, reg_interface); + ConvertMinidumpContext_x86_64(registers, reg_interface.get()); ASSERT_EQ(reg_interface->GetGPRSize(), buf->GetByteSize()); const RegisterInfo *reg_info = reg_interface->GetRegisterInfo(); @@ -407,9 +407,9 @@ llvm::ArrayRef<uint8_t> registers(parser->GetThreadContextWow64(thread)); ArchSpec arch = parser->GetArchitecture(); - RegisterInfoInterface *reg_interface = new RegisterContextLinux_i386(arch); + auto reg_interface = llvm::make_unique<RegisterContextLinux_i386>(arch); lldb::DataBufferSP buf = - ConvertMinidumpContext_x86_32(registers, reg_interface); + ConvertMinidumpContext_x86_32(registers, reg_interface.get()); ASSERT_EQ(reg_interface->GetGPRSize(), buf->GetByteSize()); const RegisterInfo *reg_info = reg_interface->GetRegisterInfo();
Index: lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp =================================================================== --- lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp +++ lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp @@ -315,9 +315,9 @@ llvm::ArrayRef<uint8_t> registers(parser->GetThreadContext(thread)); ArchSpec arch = parser->GetArchitecture(); - RegisterInfoInterface *reg_interface = new RegisterContextLinux_i386(arch); + auto reg_interface = llvm::make_unique<RegisterContextLinux_i386>(arch); lldb::DataBufferSP buf = - ConvertMinidumpContext_x86_32(registers, reg_interface); + ConvertMinidumpContext_x86_32(registers, reg_interface.get()); ASSERT_EQ(reg_interface->GetGPRSize(), buf->GetByteSize()); const RegisterInfo *reg_info = reg_interface->GetRegisterInfo(); @@ -357,9 +357,9 @@ llvm::ArrayRef<uint8_t> registers(parser->GetThreadContext(thread)); ArchSpec arch = parser->GetArchitecture(); - RegisterInfoInterface *reg_interface = new RegisterContextLinux_x86_64(arch); + auto reg_interface = llvm::make_unique<RegisterContextLinux_x86_64>(arch); lldb::DataBufferSP buf = - ConvertMinidumpContext_x86_64(registers, reg_interface); + ConvertMinidumpContext_x86_64(registers, reg_interface.get()); ASSERT_EQ(reg_interface->GetGPRSize(), buf->GetByteSize()); const RegisterInfo *reg_info = reg_interface->GetRegisterInfo(); @@ -407,9 +407,9 @@ llvm::ArrayRef<uint8_t> registers(parser->GetThreadContextWow64(thread)); ArchSpec arch = parser->GetArchitecture(); - RegisterInfoInterface *reg_interface = new RegisterContextLinux_i386(arch); + auto reg_interface = llvm::make_unique<RegisterContextLinux_i386>(arch); lldb::DataBufferSP buf = - ConvertMinidumpContext_x86_32(registers, reg_interface); + ConvertMinidumpContext_x86_32(registers, reg_interface.get()); ASSERT_EQ(reg_interface->GetGPRSize(), buf->GetByteSize()); const RegisterInfo *reg_info = reg_interface->GetRegisterInfo();
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits