• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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             BCPLComment | C89 | Digraphs | GNUMode | ImplicitInt)
40
41// C99-ish modes
42LANGSTANDARD(c99, "c99",
43             "ISO C 1999",
44             BCPLComment | C99 | Digraphs | HexFloat)
45LANGSTANDARD(c9x, "c9x",
46             "ISO C 1999",
47             BCPLComment | C99 | Digraphs | HexFloat)
48LANGSTANDARD(iso9899_1999,
49             "iso9899:1999", "ISO C 1999",
50             BCPLComment | C99 | Digraphs | HexFloat)
51LANGSTANDARD(iso9899_199x,
52             "iso9899:199x", "ISO C 1999",
53             BCPLComment | C99 | Digraphs | HexFloat)
54
55LANGSTANDARD(gnu99, "gnu99",
56             "ISO C 1999 with GNU extensions",
57             BCPLComment | C99 | Digraphs | GNUMode | HexFloat)
58LANGSTANDARD(gnu9x, "gnu9x",
59             "ISO C 1999 with GNU extensions",
60             BCPLComment | C99 | Digraphs | GNUMode | HexFloat)
61
62// C1X modes
63LANGSTANDARD(c1x, "c1x",
64             "ISO C 201X",
65             BCPLComment | C99 | C1X | Digraphs | HexFloat)
66LANGSTANDARD(iso9899_201x,
67             "iso9899:201x", "ISO C 201X",
68             BCPLComment | C99 | C1X | Digraphs | HexFloat)
69
70LANGSTANDARD(gnu1x, "gnu1x",
71             "ISO C 201X with GNU extensions",
72             BCPLComment | C99 | C1X | Digraphs | GNUMode | HexFloat)
73
74// C++ modes
75LANGSTANDARD(cxx98, "c++98",
76             "ISO C++ 1998 with amendments",
77             BCPLComment | CPlusPlus | Digraphs)
78LANGSTANDARD(gnucxx98, "gnu++98",
79             "ISO C++ 1998 with " "amendments and GNU extensions",
80             BCPLComment | CPlusPlus | Digraphs | GNUMode)
81
82LANGSTANDARD(cxx0x, "c++0x",
83             "Upcoming ISO C++ 200x with amendments",
84             BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs)
85LANGSTANDARD(gnucxx0x, "gnu++0x",
86             "Upcoming ISO C++ 200x with amendments and GNU extensions",
87             BCPLComment | CPlusPlus | CPlusPlus0x | Digraphs | GNUMode)
88
89// OpenCL
90LANGSTANDARD(opencl, "cl",
91             "OpenCL 1.0",
92             BCPLComment | C99 | Digraphs | HexFloat)
93
94// CUDA
95LANGSTANDARD(cuda, "cuda",
96             "NVIDIA CUDA(tm)",
97             BCPLComment | CPlusPlus | Digraphs)
98
99#undef LANGSTANDARD
100