mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
Everywhere: Remove all KERNEL #define
s
This commit is contained in:
parent
de99dd2c89
commit
5ca2f4dfd7
Notes:
sideshowbarker
2024-07-16 23:17:55 +09:00
Author: https://github.com/tcl3
Commit: 5ca2f4dfd7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/195
73 changed files with 116 additions and 808 deletions
|
@ -6,19 +6,15 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if defined(KERNEL)
|
||||
# include <Kernel/Library/Assertions.h>
|
||||
#else
|
||||
extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
|
||||
# define __stringify_helper(x) #x
|
||||
# define __stringify(x) __stringify_helper(x)
|
||||
# define VERIFY(expr) \
|
||||
(__builtin_expect(!(expr), 0) \
|
||||
? ak_verification_failed(#expr " at " __FILE__ ":" __stringify(__LINE__)) \
|
||||
: (void)0)
|
||||
# define VERIFY_NOT_REACHED() VERIFY(false) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
#define __stringify_helper(x) #x
|
||||
#define __stringify(x) __stringify_helper(x)
|
||||
#define VERIFY(expr) \
|
||||
(__builtin_expect(!(expr), 0) \
|
||||
? ak_verification_failed(#expr " at " __FILE__ ":" __stringify(__LINE__)) \
|
||||
: (void)0)
|
||||
#define VERIFY_NOT_REACHED() VERIFY(false) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
static constexpr bool TODO = false;
|
||||
# define TODO() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
# define TODO_AARCH64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
# define TODO_RISCV64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
#endif
|
||||
#define TODO() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
#define TODO_AARCH64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
#define TODO_RISCV64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue