[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
This commit is contained in:
Florian Mayer 2022-08-04 15:02:52 -07:00
parent 3b631e47fe
commit fc6a6ee507
6 changed files with 6 additions and 0 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
#undef NDEBUG
#include <assert.h>
#include <libunwind.h>

View File

@ -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>