AK: Enable ASSERT in debug builds only

NDEBUG is defined in release builds. So we want to enable the ASSERT
macro when it *isn't* defined.
This commit is contained in:
Timothy Flynn 2024-07-17 06:33:20 -04:00 committed by Andrew Kaster
parent 3ddacaa705
commit f29c3684a6
Notes: sideshowbarker 2024-07-18 02:44:43 +09:00

View file

@ -21,7 +21,7 @@ static constexpr bool TODO = false;
#define TODO_PPC64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
#define TODO_PPC() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
#ifdef NDEBUG
#ifndef NDEBUG
extern "C" __attribute__((noreturn)) void ak_assertion_failed(char const*);
# define ASSERT(expr) \
(__builtin_expect(!(expr), 0) \