summaryrefslogtreecommitdiff
path: root/lib/ProfileData
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ProfileData')
-rw-r--r--lib/ProfileData/InstrProfReader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp
index 12c3c8256b..2ab0eb9449 100644
--- a/lib/ProfileData/InstrProfReader.cpp
+++ b/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;