We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39f7846 commit f074500Copy full SHA for f074500
libc/src/__support/macros/attributes.h
@@ -19,6 +19,10 @@
19
20
#include "properties/architectures.h"
21
22
+#ifndef __has_attribute
23
+#define __has_attribute(x) 0
24
+#endif
25
+
26
#define LIBC_INLINE inline
27
#define LIBC_INLINE_VAR inline
28
#define LIBC_INLINE_ASM __asm__ __volatile__
@@ -30,4 +34,12 @@
30
34
#define LIBC_THREAD_LOCAL thread_local
31
35
#endif
32
36
37
+#if __cplusplus >= 202002L
38
+#define LIBC_CONSTINIT constinit
39
+#elif __has_attribute(__require_constant_initialization__)
40
+#define LIBC_CONSTINIT __attribute__((__require_constant_initialization__))
41
+#else
42
+#define LIBC_CONSTINIT
43
44
33
45
#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_ATTRIBUTES_H
0 commit comments