Skip to content

Commit 69c7015

Browse files
[ProfileData] Remove an unnecessary cast (NFC) (#150472)
getBufferEnd() already returns const char *.
1 parent a608b0c commit 69c7015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/ProfileData/InstrProfReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ Error IndexedInstrProfReader::readHeader() {
12951295
// Writer first writes the length of compressed string, and then the actual
12961296
// content.
12971297
const char *VTableNamePtr = (const char *)Ptr;
1298-
if (VTableNamePtr > (const char *)DataBuffer->getBufferEnd())
1298+
if (VTableNamePtr > DataBuffer->getBufferEnd())
12991299
return make_error<InstrProfError>(instrprof_error::truncated);
13001300

13011301
VTableName = StringRef(VTableNamePtr, CompressedVTableNamesLen);

0 commit comments

Comments
 (0)