diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-05-01 17:16:24 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-05-01 17:16:24 +0000 |
commit | 32207fac808af8f395826b391ce4a56520027a63 (patch) | |
tree | 12035fb63f6c0eaf8a5ca65647bd6f519b98f8cb | |
parent | 2baa7c53c97db0df293485b0f50daeffc539c8b7 (diff) | |
download | llvm-32207fac808af8f395826b391ce4a56520027a63.tar.gz llvm-32207fac808af8f395826b391ce4a56520027a63.tar.bz2 llvm-32207fac808af8f395826b391ce4a56520027a63.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207774 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/ProfileData/InstrProfReader.cpp | 5 |
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; |