Skip to content

Commit 7fea5c0

Browse files
committed
[ORC] Try to skip unsupported targets in another reoptimization test.
Skipping another reoptimization test when target is not found.
1 parent 222d8fa commit 7fea5c0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llvm/unittests/ExecutionEngine/Orc/ReOptimizeLayerTest.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@ class ReOptimizeLayerTest : public testing::Test {
4343
consumeError(EPC.takeError());
4444
GTEST_SKIP();
4545
}
46+
47+
auto DLOrErr = JTMB->getDefaultDataLayoutForTarget();
48+
if (!DLOrErr) {
49+
consumeError(DLOrErr.takeError());
50+
GTEST_SKIP();
51+
}
4652
ES = std::make_unique<ExecutionSession>(std::move(*EPC));
4753
JD = &ES->createBareJITDylib("main");
4854
ObjLinkingLayer = std::make_unique<ObjectLinkingLayer>(
4955
*ES, std::make_unique<InProcessMemoryManager>(16384));
50-
DL = std::make_unique<DataLayout>(
51-
cantFail(JTMB->getDefaultDataLayoutForTarget()));
56+
DL = std::make_unique<DataLayout>(std::move(*DLOrErr));
5257

5358
auto TM = JTMB->createTargetMachine();
5459
if (!TM) {

0 commit comments

Comments
 (0)