[llvm] 69c7015 - [ProfileData] Remove an unnecessary cast (NFC) (#150472)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 11:23:48 PDT 2025
Author: Kazu Hirata
Date: 2025-07-24T11:23:45-07:00
New Revision: 69c7015a55504275429d6701e93f31241be5742a
URL: https://github.com/llvm/llvm-project/commit/69c7015a55504275429d6701e93f31241be5742a
DIFF: https://github.com/llvm/llvm-project/commit/69c7015a55504275429d6701e93f31241be5742a.diff
LOG: [ProfileData] Remove an unnecessary cast (NFC) (#150472)
getBufferEnd() already returns const char *.
Added:
Modified:
llvm/lib/ProfileData/InstrProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index 5c7b9e0544030..886add7131da2 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -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);
More information about the llvm-commits
mailing list