[llvm] 1de214f - [fix][unittests][llvm] Fix running unit tests without assertions. [NFCI]

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 19:28:51 PST 2019


Author: Francesco Petrogalli
Date: 2019-12-05T03:28:19Z
New Revision: 1de214fa413d7c3c0fab832fa1f9857606d2ec78

URL: https://github.com/llvm/llvm-project/commit/1de214fa413d7c3c0fab832fa1f9857606d2ec78
DIFF: https://github.com/llvm/llvm-project/commit/1de214fa413d7c3c0fab832fa1f9857606d2ec78.diff

LOG: [fix][unittests][llvm] Fix running unit tests without assertions. [NFCI]

Added: 
    

Modified: 
    llvm/unittests/Analysis/VectorUtilsTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Analysis/VectorUtilsTest.cpp b/llvm/unittests/Analysis/VectorUtilsTest.cpp
index 50d8647d0a89..7a698f308220 100644
--- a/llvm/unittests/Analysis/VectorUtilsTest.cpp
+++ b/llvm/unittests/Analysis/VectorUtilsTest.cpp
@@ -432,6 +432,7 @@ TEST_F(VFShapeAPITest, Parameters_ValidOpenMPLinear) {
 }
 
 TEST_F(VFShapeAPITest, Parameters_Invalid) {
+#ifndef NDEBUG
   // Wrong order is checked by an asseretion: make sure that the
   // assertion is not removed.
   EXPECT_DEATH(validParams({{1, VFParamKind::Vector}}),
@@ -439,6 +440,7 @@ TEST_F(VFShapeAPITest, Parameters_Invalid) {
   EXPECT_DEATH(
       validParams({{1, VFParamKind::Vector}, {0, VFParamKind::Vector}}),
       "Broken parameter list.");
+#endif
 
   // GlobalPredicate is not unique
   EXPECT_FALSE(validParams({{0, VFParamKind::Vector},


        


More information about the llvm-commits mailing list