[llvm] 0ec1693 - SandboxIRTests: Use `EXPECT_DEBUG_DEATH` (for #126376)

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 20:12:27 PST 2025


Author: NAKAMURA Takumi
Date: 2025-02-14T04:12:11Z
New Revision: 0ec16933593f610ab545a2ac3d771925195deb4d

URL: https://github.com/llvm/llvm-project/commit/0ec16933593f610ab545a2ac3d771925195deb4d
DIFF: https://github.com/llvm/llvm-project/commit/0ec16933593f610ab545a2ac3d771925195deb4d.diff

LOG: SandboxIRTests: Use `EXPECT_DEBUG_DEATH` (for #126376)

Added: 
    

Modified: 
    llvm/unittests/SandboxIR/RegionTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/SandboxIR/RegionTest.cpp b/llvm/unittests/SandboxIR/RegionTest.cpp
index 201378980fe3b..09c578bcfefaa 100644
--- a/llvm/unittests/SandboxIR/RegionTest.cpp
+++ b/llvm/unittests/SandboxIR/RegionTest.cpp
@@ -362,9 +362,8 @@ define void @foo(i8 %v) {
   llvm::Function *LLVMF = &*M->getFunction("foo");
   sandboxir::Context Ctx(C);
   auto *F = Ctx.createFunction(LLVMF);
-#ifndef NDEBUG
-  EXPECT_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI), ".*Gap*");
-#endif
+  EXPECT_DEBUG_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI),
+                     ".*Gap*");
 }
 
 // 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) {
   llvm::Function *LLVMF = &*M->getFunction("foo");
   sandboxir::Context Ctx(C);
   auto *F = Ctx.createFunction(LLVMF);
-#ifndef NDEBUG
-  EXPECT_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI), ".*already.*");
-#endif // NDEBUG
+  EXPECT_DEBUG_DEATH(sandboxir::Region::createRegionsFromMD(*F, *TTI),
+                     ".*already.*");
 }
 
 TEST_F(RegionTest, AuxRoundTrip) {


        


More information about the llvm-commits mailing list