[libunwind] fc6a6ee - [libunwind] undef NDEBUG for assert.h in tests.
Florian Mayer via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 4 19:55:50 PDT 2022
Author: Florian Mayer
Date: 2022-08-04T19:55:40-07:00
New Revision: fc6a6ee507ec2df0df7d34ba19feccb776297e4c
URL: https://github.com/llvm/llvm-project/commit/fc6a6ee507ec2df0df7d34ba19feccb776297e4c
DIFF: https://github.com/llvm/llvm-project/commit/fc6a6ee507ec2df0df7d34ba19feccb776297e4c.diff
LOG: [libunwind] undef NDEBUG for assert.h in tests.
This makes sure the assertions also get verified in optimized builds.
This matches what is already done in bad_unwind_info.pass.cpp.
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D131210
Added:
Modified:
libunwind/test/forceunwind.pass.cpp
libunwind/test/libunwind_02.pass.cpp
libunwind/test/signal_frame.pass.cpp
libunwind/test/signal_unwind.pass.cpp
libunwind/test/unw_getcontext.pass.cpp
libunwind/test/unwind_leaffunction.pass.cpp
Removed:
################################################################################
diff --git a/libunwind/test/forceunwind.pass.cpp b/libunwind/test/forceunwind.pass.cpp
index af5f234b8da68..8c26551b6d0b6 100644
--- a/libunwind/test/forceunwind.pass.cpp
+++ b/libunwind/test/forceunwind.pass.cpp
@@ -15,6 +15,7 @@
// Basic test for _Unwind_ForcedUnwind.
// See libcxxabi/test/forced_unwind* tests too.
+#undef NDEBUG
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>
diff --git a/libunwind/test/libunwind_02.pass.cpp b/libunwind/test/libunwind_02.pass.cpp
index c0d6b05c2a729..fc034378781a2 100644
--- a/libunwind/test/libunwind_02.pass.cpp
+++ b/libunwind/test/libunwind_02.pass.cpp
@@ -10,6 +10,7 @@
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
+#undef NDEBUG
#include <assert.h>
#include <stdlib.h>
#include <unwind.h>
diff --git a/libunwind/test/signal_frame.pass.cpp b/libunwind/test/signal_frame.pass.cpp
index b17804efa08c8..482481d9d96ba 100644
--- a/libunwind/test/signal_frame.pass.cpp
+++ b/libunwind/test/signal_frame.pass.cpp
@@ -21,6 +21,7 @@
// are necessary to run this test.
// UNSUPPORTED: target=powerpc{{(64)?}}-ibm-aix
+#undef NDEBUG
#include <assert.h>
#include <stdlib.h>
#include <libunwind.h>
diff --git a/libunwind/test/signal_unwind.pass.cpp b/libunwind/test/signal_unwind.pass.cpp
index 2ff50abbebb67..e6a53ab9ff952 100644
--- a/libunwind/test/signal_unwind.pass.cpp
+++ b/libunwind/test/signal_unwind.pass.cpp
@@ -13,6 +13,7 @@
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
+#undef NDEBUG
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>
diff --git a/libunwind/test/unw_getcontext.pass.cpp b/libunwind/test/unw_getcontext.pass.cpp
index 7e2735e418be7..95ffcf123267f 100644
--- a/libunwind/test/unw_getcontext.pass.cpp
+++ b/libunwind/test/unw_getcontext.pass.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#undef NDEBUG
#include <assert.h>
#include <libunwind.h>
diff --git a/libunwind/test/unwind_leaffunction.pass.cpp b/libunwind/test/unwind_leaffunction.pass.cpp
index f363dfe4a29d5..31c2254bcc7ee 100644
--- a/libunwind/test/unwind_leaffunction.pass.cpp
+++ b/libunwind/test/unwind_leaffunction.pass.cpp
@@ -13,6 +13,7 @@
// TODO: Figure out why this fails with Memory Sanitizer.
// XFAIL: msan
+#undef NDEBUG
#include <assert.h>
#include <dlfcn.h>
#include <signal.h>
More information about the cfe-commits
mailing list