[llvm] 7e566a3 - Remove another unnecessary integer-check.
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 15:08:49 PST 2023
Author: Mitch Phillips
Date: 2023-02-01T15:08:32-08:00
New Revision: 7e566a3d11172e2afb5e2bc054075711449a314d
URL: https://github.com/llvm/llvm-project/commit/7e566a3d11172e2afb5e2bc054075711449a314d
DIFF: https://github.com/llvm/llvm-project/commit/7e566a3d11172e2afb5e2bc054075711449a314d.diff
LOG: Remove another unnecessary integer-check.
Same as b3b940d1501e39563ac549c3a5a89b25ae8ab7b8
Added:
Modified:
llvm/lib/ProfileData/InstrProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index 615e5c4b36dc..fc348e3ea0bd 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -174,10 +174,6 @@ InstrProfReader::create(const Twine &Path, vfs::FileSystem &FS,
Expected<std::unique_ptr<InstrProfReader>>
InstrProfReader::create(std::unique_ptr<MemoryBuffer> Buffer,
const InstrProfCorrelator *Correlator) {
- // Sanity check the buffer.
- if (uint64_t(Buffer->getBufferSize()) > std::numeric_limits<uint64_t>::max())
- return make_error<InstrProfError>(instrprof_error::too_large);
-
if (Buffer->getBufferSize() == 0)
return make_error<InstrProfError>(instrprof_error::empty_raw_profile);
More information about the llvm-commits
mailing list