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
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);
}