summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-03 21:38:38 +0000
committerRui Ueyama <ruiu@google.com>2015-03-03 21:38:38 +0000
commit82ca5e72d2aa95a3a3b26dd3570ae358c267c224 (patch)
tree25814d2031c4a217247aba8bbfb0675d83e3ee0e
parentd9ca757ed82937a7ff8d5aa9ef8a566f0b39a37c (diff)
downloadbcm5719-llvm-82ca5e72d2aa95a3a3b26dd3570ae358c267c224.tar.gz
bcm5719-llvm-82ca5e72d2aa95a3a3b26dd3570ae358c267c224.zip
Fix -Wcast-qual warning.
llvm-svn: 231139
-rw-r--r--lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
index 7d6554c06cf..8b9e2e8f252 100644
--- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
@@ -1049,7 +1049,7 @@ StringRef FileCOFF::ArrayRefToString(ArrayRef<uint8_t> array) {
}
if (array.empty())
return "";
- StringRef s((char *)array.data(), array.size());
+ StringRef s(reinterpret_cast<const char *>(array.data()), array.size());
s = s.substr(0, s.find_first_of('\0'));
std::string *contents = new (_alloc) std::string(s.data(), s.size());
return StringRef(*contents).trim();
OpenPOWER on IntegriCloud