aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorWilliam Huang <williamjhuang@google.com>2022-12-28 21:26:16 +0000
committerWilliam Huang <williamjhuang@google.com>2023-01-03 19:24:45 +0000
commit07107f339058ba10c44b64c85412578e5e68256e (patch)
tree2c55ffc19d6de166838e9f1e5b0222325b8b40be /llvm/lib/ProfileData/SampleProfReader.cpp
parent06c440f2dac2598308d777e704cc4866471af561 (diff)
downloadllvm-07107f339058ba10c44b64c85412578e5e68256e.zip
llvm-07107f339058ba10c44b64c85412578e5e68256e.tar.gz
llvm-07107f339058ba10c44b64c85412578e5e68256e.tar.bz2
[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
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp4
1 files changed, 0 insertions, 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<uint32_t>::max())
- return sampleprof_error::too_large;
-
return std::move(Buffer);
}