diff options
author | Alex Lorenz <arphaman@gmail.com> | 2019-04-15 22:36:12 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2019-04-15 22:36:12 +0000 |
commit | d9d0c3e1382350c941bb9db998189633e1b63e18 (patch) | |
tree | b33c531f332bc7b7607aa1f0c53393c2e4dcb363 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 02a90ea73de5f11a476787b66246eb1f39fa9e4a (diff) | |
download | llvm-d9d0c3e1382350c941bb9db998189633e1b63e18.zip llvm-d9d0c3e1382350c941bb9db998189633e1b63e18.tar.gz llvm-d9d0c3e1382350c941bb9db998189633e1b63e18.tar.bz2 |
Revert r358405: "[llvm-objdump] Align instructions to a tab stop in disassembly output"
The test fails on darwin due to a sed error:
sed: 1: "y/\t/ /": transform strings are not the same length
llvm-svn: 358459
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index afd137f..bc688d6 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -595,25 +595,12 @@ public: std::vector<RelocationRef> *Rels = nullptr) { if (SP && (PrintSource || PrintLines)) SP->printSourceLine(OS, Address); - - { - formatted_raw_ostream FOS(OS); - if (!NoLeadingAddr) - FOS << format("%8" PRIx64 ":", Address.Address); - if (!NoShowRawInsn) { - FOS << ' '; - dumpBytes(Bytes, FOS); - } - FOS.flush(); - // The output of printInst starts with a tab. Print some spaces so that - // the tab has 1 column and advances to the target tab stop. - unsigned TabStop = NoShowRawInsn ? 16 : 40; - unsigned Column = FOS.getColumn(); - FOS.indent(Column < TabStop - 1 ? TabStop - 1 - Column : 7 - Column % 8); - - // The dtor calls flush() to ensure the indent comes before printInst(). + if (!NoLeadingAddr) + OS << format("%8" PRIx64 ":", Address.Address); + if (!NoShowRawInsn) { + OS << "\t"; + dumpBytes(Bytes, OS); } - if (MI) IP.printInst(MI, OS, "", STI); else |