diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index ed4f2b6..1feea42 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -508,21 +508,19 @@ void llvm::DisassembleInputMachO(StringRef Filename) { Sections[SectIdx].getSize(SectSize); uint64_t InstSize; for (uint64_t Index = 0; Index < SectSize; Index += InstSize) { - MCInst Inst; - - if (DisAsm->getInstruction(Inst, InstSize, memoryObject, Index, - DebugOut, nulls())) { - outs() << format("%8" PRIx64 ":\t", SectAddress + Index); - - DumpBytes(StringRef(Bytes.data() + Index, InstSize)); - IP->printInst(&Inst, outs(), ""); - - outs() << "\n"; - } else { - errs() << "llvm-objdump: warning: invalid instruction encoding\n"; - if (InstSize == 0) - InstSize = 1; // skip illegible bytes - } + MCInst Inst; + + if (DisAsm->getInstruction(Inst, InstSize, memoryObject, Index, + DebugOut, nulls())) { + outs() << format("%8" PRIx64 ":\t", SectAddress + Index); + DumpBytes(StringRef(Bytes.data() + Index, InstSize)); + IP->printInst(&Inst, outs(), ""); + outs() << "\n"; + } else { + errs() << "llvm-objdump: warning: invalid instruction encoding\n"; + if (InstSize == 0) + InstSize = 1; // skip illegible bytes + } } } |