[llvm] 0ab14f1 - [JITLink] Suppress expect-death test in release mode.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 22:57:21 PDT 2021


Author: Lang Hames
Date: 2021-05-24T22:57:10-07:00
New Revision: 0ab14f19685eefa38cf2598071a18b0e117c4b30

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

LOG: [JITLink] Suppress expect-death test in release mode.

Added: 
    

Modified: 
    llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
index f89e75f7eafb..8276a3e70928 100644
--- a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
+++ b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
@@ -153,10 +153,12 @@ TEST(LinkGraphTest, ContentAccessAndUpdate) {
       << "Unexpected block content size";
 
   // Expect that attempting to get already-mutable content fails if the
-  // content is not yet mutable.
+  // content is not yet mutable (debug builds only).
+#ifndef NDEBUG
   EXPECT_DEATH({ (void)B.getAlreadyMutableContent(); },
                "Content is not mutable")
       << "Unexpected mutable access allowed to immutable data";
+#endif
 
   // Check that mutable content is copied on request as expected.
   auto MutableContent = B.getMutableContent(G);


        


More information about the llvm-commits mailing list