Remove another unnecessary integer-check.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Wed, 1 Feb 2023 23:08:06 +0000 (15:08 -0800)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Wed, 1 Feb 2023 23:08:32 +0000 (15:08 -0800)
Same as b3b940d1501e39563ac549c3a5a89b25ae8ab7b8

llvm/lib/ProfileData/InstrProfReader.cpp

index 615e5c4..fc348e3 100644 (file)
@@ -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);