mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-19 09:40:00 +00:00
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:
committed by
Andrew Kaster
parent
3ddacaa705
commit
f29c3684a6
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user