[llvm-objdump] Don't print trailing space in dumpBytes
In disassembly output, dumpBytes prints a space, followed by a tab
printed by printInstr. Remove the extra space.
llvm-svn: 358045
diff --git a/llvm/lib/MC/MCInstPrinter.cpp b/llvm/lib/MC/MCInstPrinter.cpp
index ab8773e..159f407 100644
--- a/llvm/lib/MC/MCInstPrinter.cpp
+++ b/llvm/lib/MC/MCInstPrinter.cpp
@@ -21,10 +21,14 @@
void llvm::dumpBytes(ArrayRef<uint8_t> bytes, raw_ostream &OS) {
static const char hex_rep[] = "0123456789abcdef";
+ bool First = true;
for (char i: bytes) {
+ if (First)
+ First = false;
+ else
+ OS << ' ';
OS << hex_rep[(i & 0xF0) >> 4];
OS << hex_rep[i & 0xF];
- OS << ' ';
}
}