[llvm] 7fea5c0 - [ORC] Try to skip unsupported targets in another reoptimization test.

Sunho Kim via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 09:59:34 PDT 2024


Author: Sunho Kim
Date: 2024-10-12T01:59:26+09:00
New Revision: 7fea5c034ca1e08403da39d64f20b08a6e7542bd

URL: https://github.com/llvm/llvm-project/commit/7fea5c034ca1e08403da39d64f20b08a6e7542bd
DIFF: https://github.com/llvm/llvm-project/commit/7fea5c034ca1e08403da39d64f20b08a6e7542bd.diff

LOG: [ORC] Try to skip unsupported targets in another reoptimization test.

Skipping another reoptimization test when target is not found.

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
index 9f04784332f29a..6bbb4c474a38da 100644
--- a/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp
@@ -43,12 +43,17 @@ class ReOptimizeLayerTest : public testing::Test {
       consumeError(EPC.takeError());
       GTEST_SKIP();
     }
+
+    auto DLOrErr = JTMB->getDefaultDataLayoutForTarget();
+    if (!DLOrErr) {
+      consumeError(DLOrErr.takeError());
+      GTEST_SKIP();
+    }
     ES = std::make_unique<ExecutionSession>(std::move(*EPC));
     JD = &ES->createBareJITDylib("main");
     ObjLinkingLayer = std::make_unique<ObjectLinkingLayer>(
         *ES, std::make_unique<InProcessMemoryManager>(16384));
-    DL = std::make_unique<DataLayout>(
-        cantFail(JTMB->getDefaultDataLayoutForTarget()));
+    DL = std::make_unique<DataLayout>(std::move(*DLOrErr));
 
     auto TM = JTMB->createTargetMachine();
     if (!TM) {


        


More information about the llvm-commits mailing list