diff options
author | Greg Clayton <gclayton@apple.com> | 2016-06-07 23:19:00 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-06-07 23:19:00 +0000 |
commit | 32c940de377ec87a072e3d7c3f3200beec6fe90e (patch) | |
tree | 6f437fdf50522284f74a8eacb00812a490b5f73a /lldb/source/Core/Disassembler.cpp | |
parent | 9a293ca173b9c1946f9e7c63993e6686c25db10b (diff) | |
download | bcm5719-llvm-32c940de377ec87a072e3d7c3f3200beec6fe90e.tar.gz bcm5719-llvm-32c940de377ec87a072e3d7c3f3200beec6fe90e.zip |
Now that there are no cycles that cause leaks in the disassembler/instruction classes, we can get rid of the FIXME lines that were working around this issue.
<rdar://problem/26684190>
llvm-svn: 272071
Diffstat (limited to 'lldb/source/Core/Disassembler.cpp')
-rw-r--r-- | lldb/source/Core/Disassembler.cpp | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index 9ef716d3f3f..1e6a245261b 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -302,19 +302,8 @@ Disassembler::Disassemble(Debugger &debugger, if (bytes_disassembled == 0) return false; - bool result = PrintInstructions (disasm_sp.get(), - debugger, - arch, - exe_ctx, - num_instructions, - num_mixed_context_lines, - options, - strm); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disasm_sp->GetInstructionList().Clear(); - return result; + return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx, num_instructions, + num_mixed_context_lines, options, strm); } } return false; @@ -349,33 +338,17 @@ Disassembler::Disassemble(Debugger &debugger, prefer_file_cache); if (bytes_disassembled == 0) return false; - bool result = PrintInstructions (disasm_sp.get(), - debugger, - arch, - exe_ctx, - num_instructions, - num_mixed_context_lines, - options, - strm); - - // FIXME: The DisassemblerLLVMC has a reference cycle and won't go away if it has any active instructions. - // I'll fix that but for now, just clear the list and it will go away nicely. - disasm_sp->GetInstructionList().Clear(); - return result; + return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx, num_instructions, + num_mixed_context_lines, options, strm); } } return false; } - -bool -Disassembler::PrintInstructions(Disassembler *disasm_ptr, - Debugger &debugger, - const ArchSpec &arch, - const ExecutionContext &exe_ctx, - uint32_t num_instructions, - uint32_t num_mixed_context_lines, - uint32_t options, - Stream &strm) + +bool +Disassembler::PrintInstructions(Disassembler *disasm_ptr, Debugger &debugger, const ArchSpec &arch, + const ExecutionContext &exe_ctx, uint32_t num_instructions, + uint32_t num_mixed_context_lines, uint32_t options, Stream &strm) { // We got some things disassembled... size_t num_instructions_found = disasm_ptr->GetInstructionList().GetSize(); |