Wrap ifndef NDEBUG around assertion-only code (#142227)

Otherwise we get unused variable warnings.
diff --git a/llvm/unittests/SandboxIR/RegionTest.cpp b/llvm/unittests/SandboxIR/RegionTest.cpp
index 7d998b1..5d7283fa 100644
--- a/llvm/unittests/SandboxIR/RegionTest.cpp
+++ b/llvm/unittests/SandboxIR/RegionTest.cpp
@@ -437,10 +437,10 @@
 }
 !0 = !{i32 0}
 )IR");
+#ifndef NDEBUG
   llvm::Function *LLVMF = &*M->getFunction("foo");
   sandboxir::Context Ctx(C);
   auto *F = Ctx.createFunction(LLVMF);
-#ifndef NDEBUG
   EXPECT_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI), "No region.*");
 #endif
 }