summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-11-12 14:01:17 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-11-12 14:01:17 +0000
commit106fd7bed5fa9797b6f56284371f9f1a0cd59538 (patch)
tree48132df6f36e721773b05b2d140dc2a571fc4f27 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent7a7b14411786edf04800d2504e7e4b5f4ea9139f (diff)
downloadbcm5719-llvm-106fd7bed5fa9797b6f56284371f9f1a0cd59538.tar.gz
bcm5719-llvm-106fd7bed5fa9797b6f56284371f9f1a0cd59538.zip
Fixing more -Wcast-qual warnings; NFC.
llvm-svn: 221782
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index eb06f7722fe..da5c275be8d 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -377,7 +377,8 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
StringRef BytesStr;
if (error(Section.getContents(BytesStr)))
break;
- ArrayRef<uint8_t> Bytes((uint8_t *)BytesStr.data(), BytesStr.size());
+ ArrayRef<uint8_t> Bytes(reinterpret_cast<const uint8_t *>(BytesStr.data()),
+ BytesStr.size());
uint64_t Size;
uint64_t Index;
@@ -411,7 +412,8 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
outs() << format("%8" PRIx64 ":", SectionAddr + Index);
if (!NoShowRawInsn) {
outs() << "\t";
- DumpBytes(StringRef((char *)Bytes.data() + Index, Size));
+ DumpBytes(StringRef(
+ reinterpret_cast<const char *>(Bytes.data()) + Index, Size));
}
IP->printInst(&Inst, outs(), "");
outs() << CommentStream.str();
OpenPOWER on IntegriCloud