Zephyr Project API  3.3.0
A Scalable Open Source RTOS
llvm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Intel Corporation.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_
8#define ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_
9
10
11#define __no_optimization __attribute__((optnone))
12
13#if __clang_major__ >= 10
14#define __fallthrough __attribute__((fallthrough))
15#endif
16
17#define TOOLCHAIN_CLANG_VERSION \
18 ((__clang_major__ * 10000) + (__clang_minor__ * 100) + \
19 __clang_patchlevel__)
20
21#define TOOLCHAIN_HAS_PRAGMA_DIAG 1
22
23#if TOOLCHAIN_CLANG_VERSION >= 30800
24#define TOOLCHAIN_HAS_C_GENERIC 1
25#define TOOLCHAIN_HAS_C_AUTO_TYPE 1
26#endif
27
29
30#ifndef __INT8_C
31#define __INT8_C(x) x
32#endif
33
34#ifndef INT8_C
35#define INT8_C(x) __INT8_C(x)
36#endif
37
38#ifndef __UINT8_C
39#define __UINT8_C(x) x ## U
40#endif
41
42#ifndef UINT8_C
43#define UINT8_C(x) __UINT8_C(x)
44#endif
45
46#ifndef __INT16_C
47#define __INT16_C(x) x
48#endif
49
50#ifndef INT16_C
51#define INT16_C(x) __INT16_C(x)
52#endif
53
54#ifndef __UINT16_C
55#define __UINT16_C(x) x ## U
56#endif
57
58#ifndef UINT16_C
59#define UINT16_C(x) __UINT16_C(x)
60#endif
61
62#ifndef __INT32_C
63#define __INT32_C(x) x
64#endif
65
66#ifndef INT32_C
67#define INT32_C(x) __INT32_C(x)
68#endif
69
70#ifndef __UINT32_C
71#define __UINT32_C(x) x ## U
72#endif
73
74#ifndef UINT32_C
75#define UINT32_C(x) __UINT32_C(x)
76#endif
77
78#ifndef __INT64_C
79#define __INT64_C(x) x
80#endif
81
82#ifndef INT64_C
83#define INT64_C(x) __INT64_C(x)
84#endif
85
86#ifndef __UINT64_C
87#define __UINT64_C(x) x ## ULL
88#endif
89
90#ifndef UINT64_C
91#define UINT64_C(x) __UINT64_C(x)
92#endif
93
94#ifndef __INTMAX_C
95#define __INTMAX_C(x) x
96#endif
97
98#ifndef INTMAX_C
99#define INTMAX_C(x) __INTMAX_C(x)
100#endif
101
102#ifndef __UINTMAX_C
103#define __UINTMAX_C(x) x ## ULL
104#endif
105
106#ifndef UINTMAX_C
107#define UINTMAX_C(x) __UINTMAX_C(x)
108#endif
109
110#endif /* ZEPHYR_INCLUDE_TOOLCHAIN_LLVM_H_ */
GCC toolchain abstraction.