diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp --- a/llvm/lib/ProfileData/SampleProfReader.cpp +++ b/llvm/lib/ProfileData/SampleProfReader.cpp @@ -1837,10 +1837,6 @@ return EC; auto Buffer = std::move(BufferOrErr.get()); - // Check the file. - if (uint64_t(Buffer->getBufferSize()) > std::numeric_limits::max()) - return sampleprof_error::too_large; - return std::move(Buffer); }