From: Christian Ulmann Date: Fri, 28 Apr 2023 12:10:47 +0000 (+0000) Subject: [PGO] Fix expensive test compilation error X-Git-Tag: upstream/17.0.6~10078 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4030fff06ac1086d4c1623242a1de69aa1939786;p=platform%2Fupstream%2Fllvm.git [PGO] Fix expensive test compilation error This commit fixes a compilation error introduced in https://reviews.llvm.org/D149361 Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D149434 --- diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp index d7b9d73..30c4dac 100644 --- a/llvm/unittests/ProfileData/InstrProfTest.cpp +++ b/llvm/unittests/ProfileData/InstrProfTest.cpp @@ -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