1//===-- LangStandards.def - Language Standard Data --------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LANGSTANDARD
11#error "LANGSTANDARD must be defined before including this file"
12#endif
13
14/// LANGSTANDARD(IDENT, NAME, DESC, FEATURES)
15///
16/// \param IDENT - The name of the standard as a C++ identifier.
17/// \param NAME - The name of the 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 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#ifndef LANGSTANDARD_ALIAS
27#define LANGSTANDARD_ALIAS(IDENT, ALIAS)
28#endif
29
30// C89-ish modes.
31LANGSTANDARD(c89, "c89",
32             "ISO C 1990",
33             C89 | ImplicitInt)
34LANGSTANDARD(c90, "c90",
35             "ISO C 1990",
36             C89 | ImplicitInt)
37LANGSTANDARD(iso9899_1990, "iso9899:1990",
38             "ISO C 1990",
39             C89 | ImplicitInt)
40
41LANGSTANDARD(c94, "iso9899:199409",
42             "ISO C 1990 with amendment 1",
43             C89 | Digraphs | ImplicitInt)
44
45LANGSTANDARD(gnu89, "gnu89",
46             "ISO C 1990 with GNU extensions",
47             LineComment | C89 | Digraphs | GNUMode | ImplicitInt)
48LANGSTANDARD(gnu90, "gnu90",
49             "ISO C 1990 with GNU extensions",
50             LineComment | C89 | Digraphs | GNUMode | ImplicitInt)
51
52// C99-ish modes
53LANGSTANDARD(c99, "c99",
54             "ISO C 1999",
55             LineComment | C99 | Digraphs | HexFloat)
56LANGSTANDARD(c9x, "c9x",
57             "ISO C 1999",
58             LineComment | C99 | Digraphs | HexFloat)
59LANGSTANDARD(iso9899_1999,
60             "iso9899:1999", "ISO C 1999",
61             LineComment | C99 | Digraphs | HexFloat)
62LANGSTANDARD(iso9899_199x,
63             "iso9899:199x", "ISO C 1999",
64             LineComment | C99 | Digraphs | HexFloat)
65
66LANGSTANDARD(gnu99, "gnu99",
67             "ISO C 1999 with GNU extensions",
68             LineComment | C99 | Digraphs | GNUMode | HexFloat)
69LANGSTANDARD(gnu9x, "gnu9x",
70             "ISO C 1999 with GNU extensions",
71             LineComment | C99 | Digraphs | GNUMode | HexFloat)
72
73// C11 modes
74LANGSTANDARD(c11, "c11",
75             "ISO C 2011",
76             LineComment | C99 | C11 | Digraphs | HexFloat)
77LANGSTANDARD(c1x, "c1x",
78             "ISO C 2011",
79             LineComment | C99 | C11 | Digraphs | HexFloat)
80LANGSTANDARD(iso9899_2011,
81             "iso9899:2011", "ISO C 2011",
82             LineComment | C99 | C11 | Digraphs | HexFloat)
83LANGSTANDARD(iso9899_201x,
84             "iso9899:2011", "ISO C 2011",
85             LineComment | C99 | C11 | Digraphs | HexFloat)
86
87LANGSTANDARD(gnu11, "gnu11",
88             "ISO C 2011 with GNU extensions",
89             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
90LANGSTANDARD(gnu1x, "gnu1x",
91             "ISO C 2011 with GNU extensions",
92             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
93
94// C++ modes
95LANGSTANDARD(cxx98, "c++98",
96             "ISO C++ 1998 with amendments",
97             LineComment | CPlusPlus | Digraphs)
98LANGSTANDARD(cxx03, "c++03",
99             "ISO C++ 1998 with amendments",
100             LineComment | CPlusPlus | Digraphs)
101LANGSTANDARD(gnucxx98, "gnu++98",
102             "ISO C++ 1998 with amendments and GNU extensions",
103             LineComment | CPlusPlus | Digraphs | GNUMode)
104
105LANGSTANDARD(cxx0x, "c++0x",
106             "ISO C++ 2011 with amendments",
107             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
108LANGSTANDARD(cxx11, "c++11",
109             "ISO C++ 2011 with amendments",
110             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
111LANGSTANDARD(gnucxx0x, "gnu++0x",
112             "ISO C++ 2011 with amendments and GNU extensions",
113             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
114LANGSTANDARD(gnucxx11, "gnu++11",
115             "ISO C++ 2011 with amendments and GNU extensions",
116             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
117
118LANGSTANDARD(cxx1y, "c++1y",
119             "ISO C++ 2014 with amendments",
120             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
121LANGSTANDARD(cxx14, "c++14",
122             "ISO C++ 2014 with amendments",
123             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
124LANGSTANDARD(gnucxx1y, "gnu++1y",
125             "ISO C++ 2014 with amendments and GNU extensions",
126             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
127             GNUMode)
128LANGSTANDARD(gnucxx14, "gnu++14",
129             "ISO C++ 2014 with amendments and GNU extensions",
130             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
131             GNUMode)
132
133LANGSTANDARD(cxx1z, "c++1z",
134             "Working draft for ISO C++ 2017",
135             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
136             Digraphs | HexFloat)
137LANGSTANDARD(gnucxx1z, "gnu++1z",
138             "Working draft for ISO C++ 2017 with GNU extensions",
139             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
140             Digraphs | HexFloat | GNUMode)
141
142// OpenCL
143LANGSTANDARD(opencl, "cl",
144             "OpenCL 1.0",
145             LineComment | C99 | Digraphs | HexFloat)
146LANGSTANDARD(opencl11, "cl1.1",
147             "OpenCL 1.1",
148             LineComment | C99 | Digraphs | HexFloat)
149LANGSTANDARD(opencl12, "cl1.2",
150             "OpenCL 1.2",
151             LineComment | C99 | Digraphs | HexFloat)
152LANGSTANDARD(opencl20, "cl2.0",
153             "OpenCL 2.0",
154             LineComment | C99 | Digraphs | HexFloat)
155
156LANGSTANDARD_ALIAS(opencl, "CL")
157LANGSTANDARD_ALIAS(opencl11, "CL1.1")
158LANGSTANDARD_ALIAS(opencl12, "CL1.2")
159LANGSTANDARD_ALIAS(opencl20, "CL2.0")
160
161// CUDA
162LANGSTANDARD(cuda, "cuda",
163             "NVIDIA CUDA(tm)",
164             LineComment | CPlusPlus | Digraphs)
165
166#undef LANGSTANDARD
167#undef LANGSTANDARD_ALIAS
168
169