Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
//===-- LangStandards.def - Language Standard Data --------------*- C++ -*-===//
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
#ifndef LANGSTANDARD
10
#error "LANGSTANDARD must be defined before including this file"
11
#endif
12
 
13
/// LANGSTANDARD(IDENT, NAME, LANG, DESC, FEATURES)
14
///
15
/// \param IDENT - The name of the standard as a C++ identifier.
16
/// \param NAME - The name of the standard.
17
/// \param LANG - The Language for which this is a standard.
18
/// \param DESC - A short description of the standard.
19
/// \param FEATURES - The standard features as flags, these are enums from the
20
/// clang::frontend namespace, which is assumed to be available.
21
 
22
/// LANGSTANDARD_ALIAS(IDENT, ALIAS)
23
/// \param IDENT - The name of the standard as a C++ identifier.
24
/// \param ALIAS - The alias of the standard.
25
 
26
/// LANGSTANDARD_ALIAS_DEPR(IDENT, ALIAS)
27
/// Same as LANGSTANDARD_ALIAS, but for a deprecated alias.
28
 
29
#ifndef LANGSTANDARD_ALIAS
30
#define LANGSTANDARD_ALIAS(IDENT, ALIAS)
31
#endif
32
 
33
#ifndef LANGSTANDARD_ALIAS_DEPR
34
#define LANGSTANDARD_ALIAS_DEPR(IDENT, ALIAS) LANGSTANDARD_ALIAS(IDENT, ALIAS)
35
#endif
36
 
37
// C89-ish modes.
38
LANGSTANDARD(c89, "c89",
39
             C, "ISO C 1990", 0)
40
LANGSTANDARD_ALIAS(c89, "c90")
41
LANGSTANDARD_ALIAS(c89, "iso9899:1990")
42
 
43
LANGSTANDARD(c94, "iso9899:199409",
44
             C, "ISO C 1990 with amendment 1",
45
             Digraphs)
46
 
47
LANGSTANDARD(gnu89, "gnu89",
48
             C, "ISO C 1990 with GNU extensions",
49
             LineComment | Digraphs | GNUMode)
50
LANGSTANDARD_ALIAS(gnu89, "gnu90")
51
 
52
// C99-ish modes
53
LANGSTANDARD(c99, "c99",
54
             C, "ISO C 1999",
55
             LineComment | C99 | Digraphs | HexFloat)
56
LANGSTANDARD_ALIAS(c99, "iso9899:1999")
57
LANGSTANDARD_ALIAS_DEPR(c99, "c9x")
58
LANGSTANDARD_ALIAS_DEPR(c99, "iso9899:199x")
59
 
60
LANGSTANDARD(gnu99, "gnu99",
61
             C, "ISO C 1999 with GNU extensions",
62
             LineComment | C99 | Digraphs | GNUMode | HexFloat)
63
LANGSTANDARD_ALIAS_DEPR(gnu99, "gnu9x")
64
 
65
// C11 modes
66
LANGSTANDARD(c11, "c11",
67
             C, "ISO C 2011",
68
             LineComment | C99 | C11 | Digraphs | HexFloat)
69
LANGSTANDARD_ALIAS(c11, "iso9899:2011")
70
LANGSTANDARD_ALIAS_DEPR(c11, "c1x")
71
LANGSTANDARD_ALIAS_DEPR(c11, "iso9899:201x")
72
 
73
LANGSTANDARD(gnu11, "gnu11",
74
             C, "ISO C 2011 with GNU extensions",
75
             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
76
LANGSTANDARD_ALIAS_DEPR(gnu11, "gnu1x")
77
 
78
// C17 modes
79
LANGSTANDARD(c17, "c17",
80
             C, "ISO C 2017",
81
             LineComment | C99 | C11 | C17 | Digraphs | HexFloat)
82
LANGSTANDARD_ALIAS(c17, "iso9899:2017")
83
LANGSTANDARD_ALIAS(c17, "c18")
84
LANGSTANDARD_ALIAS(c17, "iso9899:2018")
85
LANGSTANDARD(gnu17, "gnu17",
86
             C, "ISO C 2017 with GNU extensions",
87
             LineComment | C99 | C11 | C17 | Digraphs | GNUMode | HexFloat)
88
LANGSTANDARD_ALIAS(gnu17, "gnu18")
89
 
90
// C2x modes
91
LANGSTANDARD(c2x, "c2x",
92
             C, "Working Draft for ISO C2x",
93
             LineComment | C99 | C11 | C17 | C2x | Digraphs | HexFloat)
94
LANGSTANDARD(gnu2x, "gnu2x",
95
             C, "Working Draft for ISO C2x with GNU extensions",
96
             LineComment | C99 | C11 | C17 | C2x | Digraphs | GNUMode | HexFloat)
97
 
98
// C++ modes
99
LANGSTANDARD(cxx98, "c++98",
100
             CXX, "ISO C++ 1998 with amendments",
101
             LineComment | CPlusPlus | Digraphs)
102
LANGSTANDARD_ALIAS(cxx98, "c++03")
103
 
104
LANGSTANDARD(gnucxx98, "gnu++98",
105
             CXX, "ISO C++ 1998 with amendments and GNU extensions",
106
             LineComment | CPlusPlus | Digraphs | GNUMode)
107
LANGSTANDARD_ALIAS(gnucxx98, "gnu++03")
108
 
109
LANGSTANDARD(cxx11, "c++11",
110
             CXX, "ISO C++ 2011 with amendments",
111
             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
112
LANGSTANDARD_ALIAS_DEPR(cxx11, "c++0x")
113
 
114
LANGSTANDARD(gnucxx11, "gnu++11", CXX,
115
             "ISO C++ 2011 with amendments and GNU extensions",
116
             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
117
LANGSTANDARD_ALIAS_DEPR(gnucxx11, "gnu++0x")
118
 
119
LANGSTANDARD(cxx14, "c++14",
120
             CXX, "ISO C++ 2014 with amendments",
121
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
122
LANGSTANDARD_ALIAS_DEPR(cxx14, "c++1y")
123
 
124
LANGSTANDARD(gnucxx14, "gnu++14",
125
             CXX, "ISO C++ 2014 with amendments and GNU extensions",
126
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
127
             GNUMode)
128
LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
129
 
130
LANGSTANDARD(cxx17, "c++17",
131
             CXX, "ISO C++ 2017 with amendments",
132
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
133
             Digraphs | HexFloat)
134
LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
135
 
136
LANGSTANDARD(gnucxx17, "gnu++17",
137
             CXX, "ISO C++ 2017 with amendments and GNU extensions",
138
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
139
             Digraphs | HexFloat | GNUMode)
140
LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
141
 
142
LANGSTANDARD(cxx20, "c++20",
143
             CXX, "ISO C++ 2020 DIS",
144
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
145
             CPlusPlus20 | Digraphs | HexFloat)
146
LANGSTANDARD_ALIAS_DEPR(cxx20, "c++2a")
147
 
148
LANGSTANDARD(gnucxx20, "gnu++20",
149
             CXX, "ISO C++ 2020 DIS with GNU extensions",
150
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
151
             CPlusPlus20 | Digraphs | HexFloat | GNUMode)
152
LANGSTANDARD_ALIAS_DEPR(gnucxx20, "gnu++2a")
153
 
154
LANGSTANDARD(cxx2b, "c++2b",
155
             CXX, "Working draft for ISO C++ 2023 DIS",
156
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
157
             CPlusPlus20 | CPlusPlus2b | Digraphs | HexFloat)
158
 
159
LANGSTANDARD(gnucxx2b, "gnu++2b",
160
             CXX, "Working draft for ISO C++ 2023 DIS with GNU extensions",
161
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
162
             CPlusPlus20 | CPlusPlus2b | Digraphs | HexFloat | GNUMode)
163
 
164
// OpenCL
165
LANGSTANDARD(opencl10, "cl1.0",
166
             OpenCL, "OpenCL 1.0",
167
             LineComment | C99 | Digraphs | HexFloat | OpenCL)
168
LANGSTANDARD_ALIAS_DEPR(opencl10, "cl")
169
 
170
LANGSTANDARD(opencl11, "cl1.1",
171
             OpenCL, "OpenCL 1.1",
172
             LineComment | C99 | Digraphs | HexFloat | OpenCL)
173
LANGSTANDARD(opencl12, "cl1.2",
174
             OpenCL, "OpenCL 1.2",
175
             LineComment | C99 | Digraphs | HexFloat | OpenCL)
176
LANGSTANDARD(opencl20, "cl2.0",
177
             OpenCL, "OpenCL 2.0",
178
             LineComment | C99 | Digraphs | HexFloat | OpenCL)
179
LANGSTANDARD(opencl30, "cl3.0",
180
             OpenCL, "OpenCL 3.0",
181
             LineComment | C99 | Digraphs | HexFloat | OpenCL)
182
 
183
LANGSTANDARD(openclcpp10, "clc++1.0",
184
             OpenCL, "C++ for OpenCL 1.0",
185
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
186
             Digraphs | HexFloat | OpenCL)
187
LANGSTANDARD_ALIAS(openclcpp10, "clc++")
188
 
189
LANGSTANDARD(openclcpp2021, "clc++2021",
190
             OpenCL, "C++ for OpenCL 2021",
191
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
192
             Digraphs | HexFloat | OpenCL)
193
 
194
LANGSTANDARD_ALIAS_DEPR(opencl10, "CL")
195
LANGSTANDARD_ALIAS_DEPR(opencl11, "CL1.1")
196
LANGSTANDARD_ALIAS_DEPR(opencl12, "CL1.2")
197
LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0")
198
LANGSTANDARD_ALIAS_DEPR(opencl30, "CL3.0")
199
LANGSTANDARD_ALIAS_DEPR(openclcpp10, "CLC++")
200
LANGSTANDARD_ALIAS_DEPR(openclcpp10, "CLC++1.0")
201
LANGSTANDARD_ALIAS_DEPR(openclcpp2021, "CLC++2021")
202
 
203
// CUDA
204
LANGSTANDARD(cuda, "cuda", CUDA, "NVIDIA CUDA(tm)",
205
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
206
 
207
// HIP
208
LANGSTANDARD(hip, "hip", HIP, "HIP",
209
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
210
 
211
// HLSL
212
LANGSTANDARD(hlsl, "hlsl",
213
             HLSL, "High Level Shader Language",
214
             LineComment | HLSL | CPlusPlus )
215
 
216
LANGSTANDARD(hlsl2015, "hlsl2015",
217
             HLSL, "High Level Shader Language 2015",
218
             LineComment | HLSL | CPlusPlus )
219
 
220
LANGSTANDARD(hlsl2016, "hlsl2016",
221
             HLSL, "High Level Shader Language 2016",
222
             LineComment | HLSL | CPlusPlus )
223
 
224
LANGSTANDARD(hlsl2017, "hlsl2017",
225
             HLSL, "High Level Shader Language 2017",
226
             LineComment | HLSL | CPlusPlus )
227
 
228
LANGSTANDARD(hlsl2018, "hlsl2018",
229
             HLSL, "High Level Shader Language 2018",
230
             LineComment | HLSL | CPlusPlus )
231
 
232
LANGSTANDARD(hlsl2021, "hlsl2021",
233
             HLSL, "High Level Shader Language 2021",
234
             LineComment | HLSL | CPlusPlus )
235
 
236
LANGSTANDARD(hlsl202x, "hlsl202x",
237
             HLSL, "High Level Shader Language 202x",
238
             LineComment | HLSL | CPlusPlus | CPlusPlus11)
239
 
240
 
241
#undef LANGSTANDARD
242
#undef LANGSTANDARD_ALIAS
243
#undef LANGSTANDARD_ALIAS_DEPR