Skip to content

Commit d9d0c3e

Browse files
committed
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
1 parent 02a90ea commit d9d0c3e

File tree

2 files changed

+5
-47
lines changed

2 files changed

+5
-47
lines changed

llvm/test/tools/llvm-objdump/X86/disassemble-align.s

Lines changed: 0 additions & 29 deletions
This file was deleted.

llvm/tools/llvm-objdump/llvm-objdump.cpp

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -595,25 +595,12 @@ class PrettyPrinter {
595595
std::vector<RelocationRef> *Rels = nullptr) {
596596
if (SP && (PrintSource || PrintLines))
597597
SP->printSourceLine(OS, Address);
598-
599-
{
600-
formatted_raw_ostream FOS(OS);
601-
if (!NoLeadingAddr)
602-
FOS << format("%8" PRIx64 ":", Address.Address);
603-
if (!NoShowRawInsn) {
604-
FOS << ' ';
605-
dumpBytes(Bytes, FOS);
606-
}
607-
FOS.flush();
608-
// The output of printInst starts with a tab. Print some spaces so that
609-
// the tab has 1 column and advances to the target tab stop.
610-
unsigned TabStop = NoShowRawInsn ? 16 : 40;
611-
unsigned Column = FOS.getColumn();
612-
FOS.indent(Column < TabStop - 1 ? TabStop - 1 - Column : 7 - Column % 8);
613-
614-
// The dtor calls flush() to ensure the indent comes before printInst().
598+
if (!NoLeadingAddr)
599+
OS << format("%8" PRIx64 ":", Address.Address);
600+
if (!NoShowRawInsn) {
601+
OS << "\t";
602+
dumpBytes(Bytes, OS);
615603
}
616-
617604
if (MI)
618605
IP.printInst(MI, OS, "", STI);
619606
else

0 commit comments

Comments
 (0)