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             "Working draft for ISO C++ 2014",
112             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus1y | Digraphs)
113LANGSTANDARD(gnucxx1y, "gnu++1y",
114             "Working draft for ISO C++ 2014 with GNU extensions",
115             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus1y | Digraphs |
116             GNUMode)
117
118// OpenCL
119LANGSTANDARD(opencl, "cl",
120             "OpenCL 1.0",
121             LineComment | C99 | Digraphs | HexFloat)
122LANGSTANDARD(opencl11, "CL1.1",
123             "OpenCL 1.1",
124             LineComment | C99 | Digraphs | HexFloat)
125LANGSTANDARD(opencl12, "CL1.2",
126             "OpenCL 1.2",
127             LineComment | C99 | Digraphs | HexFloat)
128
129// CUDA
130LANGSTANDARD(cuda, "cuda",
131             "NVIDIA CUDA(tm)",
132             LineComment | CPlusPlus | Digraphs)
133
134#undef LANGSTANDARD
135