[llvm] 4030fff - [PGO] Fix expensive test compilation error
    Christian Ulmann via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Apr 28 05:17:30 PDT 2023
    
    
  
Author: Christian Ulmann
Date: 2023-04-28T12:17:01Z
New Revision: 4030fff06ac1086d4c1623242a1de69aa1939786
URL: https://github.com/llvm/llvm-project/commit/4030fff06ac1086d4c1623242a1de69aa1939786
DIFF: https://github.com/llvm/llvm-project/commit/4030fff06ac1086d4c1623242a1de69aa1939786.diff
LOG: [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
Added: 
    
Modified: 
    llvm/unittests/ProfileData/InstrProfTest.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp
index d7b9d73c17b1b..30c4dac0bd2f2 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
 
        
    
    
More information about the llvm-commits
mailing list