[PATCH] D149434: [PGO] Fix expensive test compilation error

Christian Ulmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 02:54:25 PDT 2023


Dinistro created this revision.
Dinistro added reviewers: paquette, jroelofs.
Herald added subscribers: wlei, wenlei.
Herald added a project: All.
Dinistro requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This commit fixes a compilation error introduced in
https://reviews.llvm.org/D149361


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149434

Files:
  llvm/unittests/ProfileData/InstrProfTest.cpp


Index: llvm/unittests/ProfileData/InstrProfTest.cpp
===================================================================
--- llvm/unittests/ProfileData/InstrProfTest.cpp
+++ llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -1356,16 +1356,18 @@
   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
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149434.517852.patch
Type: text/x-patch
Size: 1116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230428/f46fbcbf/attachment.bin>


More information about the llvm-commits mailing list