xref: /freebsd/contrib/llvm-project/clang/lib/Headers/stdalign.h (revision 0ad011ececb978e22a9bff2acf76633b094f1ff6)
1 /*===---- stdalign.h - Standard header for alignment ------------------------===
2  *
3  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4  * See https://llvm.org/LICENSE.txt for license information.
5  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6  *
7  *===-----------------------------------------------------------------------===
8  */
9 
10 #ifndef __STDALIGN_H
11 #define __STDALIGN_H
12 
13 /* FIXME: This is using the placeholder dates Clang produces for these macros
14    in C2x mode; switch to the correct values once they've been published. */
15 #if defined(__cplusplus) ||                                                    \
16     (defined(__STDC_VERSION__) && __STDC_VERSION__ < 202000L)
17 #ifndef __cplusplus
18 #define alignas _Alignas
19 #define alignof _Alignof
20 #endif
21 
22 #define __alignas_is_defined 1
23 #define __alignof_is_defined 1
24 #endif /* __STDC_VERSION__ */
25 
26 #endif /* __STDALIGN_H */
27