[ProfileData] Remove an unnecessary cast (NFC) (#150472)

getBufferEnd() already returns const char *.
This commit is contained in:
Kazu Hirata 2025-07-24 11:23:45 -07:00 committed by GitHub
parent a608b0c7ca
commit 69c7015a55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1295,7 +1295,7 @@ Error IndexedInstrProfReader::readHeader() {
// Writer first writes the length of compressed string, and then the actual
// content.
const char *VTableNamePtr = (const char *)Ptr;
if (VTableNamePtr > (const char *)DataBuffer->getBufferEnd())
if (VTableNamePtr > DataBuffer->getBufferEnd())
return make_error<InstrProfError>(instrprof_error::truncated);
VTableName = StringRef(VTableNamePtr, CompressedVTableNamesLen);