Skip to content

Commit

Permalink
[PGO] Fix expensive test compilation error
Browse files Browse the repository at this point in the history
This commit fixes a compilation error introduced in
https://reviews.llvm.org/D149361

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D149434
  • Loading branch information
Dinistro committed Apr 28, 2023
1 parent de01dba commit 4030fff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions llvm/unittests/ProfileData/InstrProfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,16 +1356,18 @@ TEST(ProfileReaderTest, ReadsLargeFiles) {
if (!RawProfile)
GTEST_SKIP();
auto RawProfileReaderOrErr = InstrProfReader::create(std::move(RawProfile));
ASSERT_TRUE(InstrProfError::take(RawProfileReaderOrErr.takeError()) ==
instrprof_error::unrecognized_format);
ASSERT_TRUE(
std::get<0>(InstrProfError::take(RawProfileReaderOrErr.takeError())) ==
instrprof_error::unrecognized_format);

auto IndexedProfile = WritableMemoryBuffer::getNewUninitMemBuffer(LargeSize);
if (!IndexedProfile)
GTEST_SKIP();
auto IndexedReaderOrErr =
IndexedInstrProfReader::create(std::move(IndexedProfile), nullptr);
ASSERT_TRUE(InstrProfError::take(IndexedReaderOrErr.takeError()) ==
instrprof_error::bad_magic);
ASSERT_TRUE(
std::get<0>(InstrProfError::take(IndexedReaderOrErr.takeError())) ==
instrprof_error::bad_magic);
}
#endif

Expand Down

0 comments on commit 4030fff

Please sign in to comment.