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// C89-ish modes.
23LANGSTANDARD(c89, "c89",
24             "ISO C 1990",
25             C89 | ImplicitInt)
26LANGSTANDARD(c90, "c90",
27             "ISO C 1990",
28             C89 | ImplicitInt)
29LANGSTANDARD(iso9899_1990, "iso9899:1990",
30             "ISO C 1990",
31             C89 | ImplicitInt)
32
33LANGSTANDARD(c94, "iso9899:199409",
34             "ISO C 1990 with amendment 1",
35             C89 | Digraphs | ImplicitInt)
36
37LANGSTANDARD(gnu89, "gnu89",
38             "ISO C 1990 with GNU extensions",
39             LineComment | C89 | Digraphs | GNUMode | ImplicitInt)
40LANGSTANDARD(gnu90, "gnu90",
41             "ISO C 1990 with GNU extensions",
42             LineComment | C89 | Digraphs | GNUMode | ImplicitInt)
43
44// C99-ish modes
45LANGSTANDARD(c99, "c99",
46             "ISO C 1999",
47             LineComment | C99 | Digraphs | HexFloat)
48LANGSTANDARD(c9x, "c9x",
49             "ISO C 1999",
50             LineComment | C99 | Digraphs | HexFloat)
51LANGSTANDARD(iso9899_1999,
52             "iso9899:1999", "ISO C 1999",
53             LineComment | C99 | Digraphs | HexFloat)
54LANGSTANDARD(iso9899_199x,
55             "iso9899:199x", "ISO C 1999",
56             LineComment | C99 | Digraphs | HexFloat)
57
58LANGSTANDARD(gnu99, "gnu99",
59             "ISO C 1999 with GNU extensions",
60             LineComment | C99 | Digraphs | GNUMode | HexFloat)
61LANGSTANDARD(gnu9x, "gnu9x",
62             "ISO C 1999 with GNU extensions",
63             LineComment | C99 | Digraphs | GNUMode | HexFloat)
64
65// C11 modes
66LANGSTANDARD(c11, "c11",
67             "ISO C 2011",
68             LineComment | C99 | C11 | Digraphs | HexFloat)
69LANGSTANDARD(c1x, "c1x",
70             "ISO C 2011",
71             LineComment | C99 | C11 | Digraphs | HexFloat)
72LANGSTANDARD(iso9899_2011,
73             "iso9899:2011", "ISO C 2011",
74             LineComment | C99 | C11 | Digraphs | HexFloat)
75LANGSTANDARD(iso9899_201x,
76             "iso9899:2011", "ISO C 2011",
77             LineComment | C99 | C11 | Digraphs | HexFloat)
78
79LANGSTANDARD(gnu11, "gnu11",
80             "ISO C 2011 with GNU extensions",
81             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
82LANGSTANDARD(gnu1x, "gnu1x",
83             "ISO C 2011 with GNU extensions",
84             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
85
86// C++ modes
87LANGSTANDARD(cxx98, "c++98",
88             "ISO C++ 1998 with amendments",
89             LineComment | CPlusPlus | Digraphs)
90LANGSTANDARD(cxx03, "c++03",
91             "ISO C++ 1998 with amendments",
92             LineComment | CPlusPlus | Digraphs)
93LANGSTANDARD(gnucxx98, "gnu++98",
94             "ISO C++ 1998 with amendments and GNU extensions",
95             LineComment | CPlusPlus | Digraphs | GNUMode)
96
97LANGSTANDARD(cxx0x, "c++0x",
98             "ISO C++ 2011 with amendments",
99             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
100LANGSTANDARD(cxx11, "c++11",
101             "ISO C++ 2011 with amendments",
102             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
103LANGSTANDARD(gnucxx0x, "gnu++0x",
104             "ISO C++ 2011 with amendments and GNU extensions",
105             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
106LANGSTANDARD(gnucxx11, "gnu++11",
107             "ISO C++ 2011 with amendments and GNU extensions",
108             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
109
110LANGSTANDARD(cxx1y, "c++1y",
111             "ISO C++ 2014 with amendments",
112             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
113LANGSTANDARD(cxx14, "c++14",
114             "ISO C++ 2014 with amendments",
115             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
116LANGSTANDARD(gnucxx1y, "gnu++1y",
117             "ISO C++ 2014 with amendments and GNU extensions",
118             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
119             GNUMode)
120LANGSTANDARD(gnucxx14, "gnu++14",
121             "ISO C++ 2014 with amendments and GNU extensions",
122             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
123             GNUMode)
124
125LANGSTANDARD(cxx1z, "c++1z",
126             "Working draft for ISO C++ 2017",
127             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
128             Digraphs)
129LANGSTANDARD(gnucxx1z, "gnu++1z",
130             "Working draft for ISO C++ 2017 with GNU extensions",
131             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
132             Digraphs | GNUMode)
133
134// OpenCL
135LANGSTANDARD(opencl, "cl",
136             "OpenCL 1.0",
137             LineComment | C99 | Digraphs | HexFloat)
138LANGSTANDARD(opencl11, "CL1.1",
139             "OpenCL 1.1",
140             LineComment | C99 | Digraphs | HexFloat)
141LANGSTANDARD(opencl12, "CL1.2",
142             "OpenCL 1.2",
143             LineComment | C99 | Digraphs | HexFloat)
144LANGSTANDARD(opencl20, "CL2.0",
145             "OpenCL 2.0",
146             LineComment | C99 | Digraphs | HexFloat)
147
148// CUDA
149LANGSTANDARD(cuda, "cuda",
150             "NVIDIA CUDA(tm)",
151             LineComment | CPlusPlus | Digraphs)
152
153#undef LANGSTANDARD
154