diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-05-18 22:08:52 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-05-18 22:08:52 +0000 |
commit | a5aab9ad582ef6c8432139b28717a0525f2e818e (patch) | |
tree | 9bc34fc0db3af0b3a37455b96870a1fef9a4e089 /lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp | |
parent | 3f5c08f5c25b5012a1f71a820657324c0ea2f273 (diff) | |
download | bcm5719-llvm-a5aab9ad582ef6c8432139b28717a0525f2e818e.tar.gz bcm5719-llvm-a5aab9ad582ef6c8432139b28717a0525f2e818e.zip |
Remove dead code which tests for boolan flag 'raw' and restore one indentation level.
llvm-svn: 131589
Diffstat (limited to 'lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp')
-rw-r--r-- | lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp | 86 |
1 files changed, 39 insertions, 47 deletions
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp index 047a2449a77..2620eedac61 100644 --- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp +++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp @@ -241,64 +241,56 @@ InstructionLLVM::Dump if (EDGetToken(&token, m_inst, tokenIndex)) return; - if (raw) - { - show_token = true; - } - else - { - int operandIndex = EDOperandIndexForToken(token); + int operandIndex = EDOperandIndexForToken(token); - if (operandIndex >= 0) + if (operandIndex >= 0) + { + if (operandIndex != currentOpIndex) { - if (operandIndex != currentOpIndex) - { - show_token = true; + show_token = true; - currentOpIndex = operandIndex; - EDOperandRef operand; + currentOpIndex = operandIndex; + EDOperandRef operand; - if (!EDGetOperand(&operand, m_inst, currentOpIndex)) + if (!EDGetOperand(&operand, m_inst, currentOpIndex)) + { + if (EDOperandIsMemory(operand)) { - if (EDOperandIsMemory(operand)) - { - uint64_t operand_value; + uint64_t operand_value; - if (!EDEvaluateOperand(&operand_value, operand, IPRegisterReader, &rra)) + if (!EDEvaluateOperand(&operand_value, operand, IPRegisterReader, &rra)) + { + if (EDInstIsBranch(m_inst)) { - if (EDInstIsBranch(m_inst)) - { - operands.Printf("0x%llx ", operand_value); - show_token = false; - } - else - { - // Put the address value into the comment - comment.Printf("0x%llx ", operand_value); - } + operands.Printf("0x%llx ", operand_value); + show_token = false; + } + else + { + // Put the address value into the comment + comment.Printf("0x%llx ", operand_value); + } - lldb_private::Address so_addr; - if (exe_ctx && exe_ctx->target && !exe_ctx->target->GetSectionLoadList().IsEmpty()) + lldb_private::Address so_addr; + if (exe_ctx && exe_ctx->target && !exe_ctx->target->GetSectionLoadList().IsEmpty()) + { + if (exe_ctx->target->GetSectionLoadList().ResolveLoadAddress (operand_value, so_addr)) + so_addr.Dump(&comment, exe_scope, Address::DumpStyleResolvedDescriptionNoModule, Address::DumpStyleSectionNameOffset); + } + else + { + Module *module = GetAddress().GetModule(); + if (module) { - if (exe_ctx->target->GetSectionLoadList().ResolveLoadAddress (operand_value, so_addr)) + if (module->ResolveFileAddress (operand_value, so_addr)) so_addr.Dump(&comment, exe_scope, Address::DumpStyleResolvedDescriptionNoModule, Address::DumpStyleSectionNameOffset); } - else - { - Module *module = GetAddress().GetModule(); - if (module) - { - if (module->ResolveFileAddress (operand_value, so_addr)) - so_addr.Dump(&comment, exe_scope, Address::DumpStyleResolvedDescriptionNoModule, Address::DumpStyleSectionNameOffset); - } - } - - } // EDEvaluateOperand - } // EDOperandIsMemory - } // EDGetOperand - } // operandIndex != currentOpIndex - } // operandIndex >= 0 - } // else(raw) + } + } // EDEvaluateOperand + } // EDOperandIsMemory + } // EDGetOperand + } // operandIndex != currentOpIndex + } // operandIndex >= 0 if (show_token) { |