Skip to content

Commit 0ec1693

Browse files
committed
SandboxIRTests: Use EXPECT_DEBUG_DEATH (for llvm#126376)
1 parent e477e56 commit 0ec1693

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/unittests/SandboxIR/RegionTest.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,8 @@ define void @foo(i8 %v) {
362362
llvm::Function *LLVMF = &*M->getFunction("foo");
363363
sandboxir::Context Ctx(C);
364364
auto *F = Ctx.createFunction(LLVMF);
365-
#ifndef NDEBUG
366-
EXPECT_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI), ".*Gap*");
367-
#endif
365+
EXPECT_DEBUG_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI),
366+
".*Gap*");
368367
}
369368

370369
// Check that we get an assertion failure if we try to set the same index more
@@ -383,9 +382,8 @@ define void @foo(i8 %v) {
383382
llvm::Function *LLVMF = &*M->getFunction("foo");
384383
sandboxir::Context Ctx(C);
385384
auto *F = Ctx.createFunction(LLVMF);
386-
#ifndef NDEBUG
387-
EXPECT_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI), ".*already.*");
388-
#endif // NDEBUG
385+
EXPECT_DEBUG_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI),
386+
".*already.*");
389387
}
390388

391389
TEST_F(RegionTest, AuxRoundTrip) {

0 commit comments

Comments
 (0)