diff options
author | Colin LeMahieu <colinl@codeaurora.org> | 2015-03-18 19:27:31 +0000 |
---|---|---|
committer | Colin LeMahieu <colinl@codeaurora.org> | 2015-03-18 19:27:31 +0000 |
commit | fc32b1b874eadb1afad1c711e81d3bf696c6d042 (patch) | |
tree | 34cafd5cbcc17b108960e97074660ea4d7a2bd8a /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 105270f68ca894e205b97b3c7ed709affa7df4fe (diff) | |
download | bcm5719-llvm-fc32b1b874eadb1afad1c711e81d3bf696c6d042.tar.gz bcm5719-llvm-fc32b1b874eadb1afad1c711e81d3bf696c6d042.zip |
[Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from StringRef. Removing reinterpret_casts.
llvm-svn: 232659
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 365d2ff5e37..7bec062070a 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -194,7 +194,7 @@ static const Target *getTarget(const ObjectFile *Obj = nullptr) { return TheTarget; } -void llvm::DumpBytes(StringRef bytes) { +void llvm::DumpBytes(ArrayRef<uint8_t> bytes) { static const char hex_rep[] = "0123456789abcdef"; SmallString<64> output; @@ -399,8 +399,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { outs() << format("%8" PRIx64 ":", SectionAddr + Index); if (!NoShowRawInsn) { outs() << "\t"; - DumpBytes(StringRef( - reinterpret_cast<const char *>(Bytes.data()) + Index, Size)); + DumpBytes(ArrayRef<uint8_t>(Bytes.data() + Index, Size)); } IP->printInst(&Inst, outs(), ""); outs() << CommentStream.str(); |