diff options
author | Fangrui Song <maskray@google.com> | 2019-04-10 05:31:21 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-10 05:31:21 +0000 |
commit | 7d4ad143715c22ef8e28157df26e7da29dc89cfa (patch) | |
tree | 07292a0b5f79695f4a91a0c043ab893c5e12a7fe /llvm/lib | |
parent | f8a74c18ec8869f42a5d48ad20c33e3021f68f26 (diff) | |
download | bcm5719-llvm-7d4ad143715c22ef8e28157df26e7da29dc89cfa.tar.gz bcm5719-llvm-7d4ad143715c22ef8e28157df26e7da29dc89cfa.zip |
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/MCInstPrinter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCInstPrinter.cpp b/llvm/lib/MC/MCInstPrinter.cpp index ab8773e7bbb..159f4070fe9 100644 --- a/llvm/lib/MC/MCInstPrinter.cpp +++ b/llvm/lib/MC/MCInstPrinter.cpp @@ -21,10 +21,14 @@ using namespace llvm; 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 << ' '; } } |