Skip to content

Commit fc6a6ee

Browse files
committed
[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
1 parent 3b631e4 commit fc6a6ee

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

libunwind/test/forceunwind.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// Basic test for _Unwind_ForcedUnwind.
1616
// See libcxxabi/test/forced_unwind* tests too.
1717

18+
#undef NDEBUG
1819
#include <assert.h>
1920
#include <dlfcn.h>
2021
#include <signal.h>

libunwind/test/libunwind_02.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// TODO: Figure out why this fails with Memory Sanitizer.
1111
// XFAIL: msan
1212

13+
#undef NDEBUG
1314
#include <assert.h>
1415
#include <stdlib.h>
1516
#include <unwind.h>

libunwind/test/signal_frame.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// are necessary to run this test.
2222
// UNSUPPORTED: target=powerpc{{(64)?}}-ibm-aix
2323

24+
#undef NDEBUG
2425
#include <assert.h>
2526
#include <stdlib.h>
2627
#include <libunwind.h>

libunwind/test/signal_unwind.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// TODO: Figure out why this fails with Memory Sanitizer.
1414
// XFAIL: msan
1515

16+
#undef NDEBUG
1617
#include <assert.h>
1718
#include <dlfcn.h>
1819
#include <signal.h>

libunwind/test/unw_getcontext.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10+
#undef NDEBUG
1011
#include <assert.h>
1112
#include <libunwind.h>
1213

libunwind/test/unwind_leaffunction.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// TODO: Figure out why this fails with Memory Sanitizer.
1414
// XFAIL: msan
1515

16+
#undef NDEBUG
1617
#include <assert.h>
1718
#include <dlfcn.h>
1819
#include <signal.h>

0 commit comments

Comments
 (0)