From f29c3684a67bc0fcb4ce03c87167ebd2fe18391f Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 17 Jul 2024 06:33:20 -0400 Subject: [PATCH] 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. --- AK/Assertions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Assertions.h b/AK/Assertions.h index 7355fefeda..0d09c7b7fd 100644 --- a/AK/Assertions.h +++ b/AK/Assertions.h @@ -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) \