summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-05-01 17:16:24 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-05-01 17:16:24 +0000
commita7c9ed57d9f55800a88389f658a648019d929e59 (patch)
tree8a4d089872e108c288deaac676991208082b47c8 /llvm/lib/ProfileData
parent756199ccea2ad2be0e8aae83f50da7d3059dcd1a (diff)
downloadbcm5719-llvm-a7c9ed57d9f55800a88389f658a648019d929e59.tar.gz
bcm5719-llvm-a7c9ed57d9f55800a88389f658a648019d929e59.zip
Fixing a cast-qual warning. getBufferStart() and getBufferEnd() both return a const char *, so casting to non-const was triggering a warning (even though the assignment and usage was always const anyway).
No functional changes intended. llvm-svn: 207774
Diffstat (limited to 'llvm/lib/ProfileData')
-rw-r--r--llvm/lib/ProfileData/InstrProfReader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index 12c3c8256be..2ab0eb9449c 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -262,9 +262,10 @@ bool IndexedInstrProfReader::hasFormat(const MemoryBuffer &DataBuffer) {
}
error_code IndexedInstrProfReader::readHeader() {
- const unsigned char *Start = (unsigned char *)DataBuffer->getBufferStart();
+ const unsigned char *Start =
+ (const unsigned char *)DataBuffer->getBufferStart();
const unsigned char *Cur = Start;
- if ((unsigned char *)DataBuffer->getBufferEnd() - Cur < 24)
+ if ((const unsigned char *)DataBuffer->getBufferEnd() - Cur < 24)
return error(instrprof_error::truncated);
using namespace support;
OpenPOWER on IntegriCloud