Skip to content

Commit 1d338a0

Browse files
authored
Wrap ifndef NDEBUG around assertion-only code (#142227)
Otherwise we get unused variable warnings.
1 parent 339851e commit 1d338a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/unittests/SandboxIR/RegionTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ define void @foo(i8 %v) {
437437
}
438438
!0 = !{i32 0}
439439
)IR");
440+
#ifndef NDEBUG
440441
llvm::Function *LLVMF = &*M->getFunction("foo");
441442
sandboxir::Context Ctx(C);
442443
auto *F = Ctx.createFunction(LLVMF);
443-
#ifndef NDEBUG
444444
EXPECT_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI), "No region.*");
445445
#endif
446446
}

0 commit comments

Comments
 (0)