diff options
author | Andrew Kaster <akaster@serenityos.org> | 2023-02-05 08:15:55 -0700 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-02-05 09:46:51 -0700 |
commit | 012aaecccfb1a7f58825e68cd747398a9548fdae (patch) | |
tree | 33ebad8f8464651687c58d6c034b9d81948c0818 /AK/Assertions.h | |
parent | 17965f4d2d0570ad4190ff14f5f64224eac6ff67 (diff) | |
download | serenity-012aaecccfb1a7f58825e68cd747398a9548fdae.zip |
AK: Always define ak_assertion_failed, even when NDEBUG is false
Just because we may compile serenity with or without NDEBUG doesn't
mean that consuming projects or Ports will share the setting.
Always define the custom assertion function so that we don't have to
keep the same debug settings between all projects.
Diffstat (limited to 'AK/Assertions.h')
-rw-r--r-- | AK/Assertions.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/Assertions.h b/AK/Assertions.h index d3de619a72..0c01eddc58 100644 --- a/AK/Assertions.h +++ b/AK/Assertions.h @@ -10,12 +10,12 @@ # include <Kernel/Assertions.h> #else # include <assert.h> +extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*); # ifndef NDEBUG # define VERIFY assert # else # define __stringify_helper(x) #x # define __stringify(x) __stringify_helper(x) -extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*); # define VERIFY(expr) \ (__builtin_expect(!(expr), 0) \ ? ak_verification_failed(#expr "\n" __FILE__ ":" __stringify(__LINE__)) \ |