diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h index 9514a6da72..84719fd345 100644 --- a/AK/NonnullRefPtr.h +++ b/AK/NonnullRefPtr.h @@ -4,18 +4,6 @@ #include #include -#ifdef __clang__ -# define CONSUMABLE(initial_state) __attribute__((consumable(initial_state))) -# define CALLABLE_WHEN(...) __attribute__((callable_when(__VA_ARGS__))) -# define SET_TYPESTATE(state) __attribute__((set_typestate(state))) -# define RETURN_TYPESTATE(state) __attribute__((return_typestate(state))) -#else -# define CONSUMABLE(initial_state) -# define CALLABLE_WHEN(state) -# define SET_TYPESTATE(state) -# define RETURN_TYPESTATE(state) -#endif - namespace AK { template diff --git a/AK/Platform.h b/AK/Platform.h index 55eba697cd..7764b93923 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -10,3 +10,14 @@ #define ARCH(arch) (defined(AK_ARCH_##arch) && AK_ARCH_##arch) +#ifdef __clang__ +# define CONSUMABLE(initial_state) __attribute__((consumable(initial_state))) +# define CALLABLE_WHEN(...) __attribute__((callable_when(__VA_ARGS__))) +# define SET_TYPESTATE(state) __attribute__((set_typestate(state))) +# define RETURN_TYPESTATE(state) __attribute__((return_typestate(state))) +#else +# define CONSUMABLE(initial_state) +# define CALLABLE_WHEN(state) +# define SET_TYPESTATE(state) +# define RETURN_TYPESTATE(state) +#endif diff --git a/AK/Types.h b/AK/Types.h index 7e894f416e..02e5fca1ee 100644 --- a/AK/Types.h +++ b/AK/Types.h @@ -1,6 +1,7 @@ #pragma once #include +#include #ifdef __serenity__ typedef unsigned char u8;