From 0ab14f19685eefa38cf2598071a18b0e117c4b30 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 24 May 2021 22:56:17 -0700 Subject: [PATCH] [JITLink] Suppress expect-death test in release mode. --- llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp index f89e75f..8276a3e 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); -- 2.7.4