From 07107f339058ba10c44b64c85412578e5e68256e Mon Sep 17 00:00:00 2001 From: William Huang Date: Wed, 28 Dec 2022 21:26:16 +0000 Subject: [PATCH] [llvm-profdata] Remove unnecessary file size check Unsure why profile reader checks profile size to be less than 4 GB. This breaks builds using a very large profile. The limit is not seen anywhere else, so I am not sure why is it there in the first place. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D140741 --- llvm/lib/ProfileData/SampleProfReader.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp index 25b13e0..b2a38c6 100644 --- a/llvm/lib/ProfileData/SampleProfReader.cpp +++ b/llvm/lib/ProfileData/SampleProfReader.cpp @@ -1837,10 +1837,6 @@ setupMemoryBuffer(const Twine &Filename) { 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); } -- 2.7.4