blob: 70b44b8448b2c0f3083fcf885ca1563f35baeeda [file] [log] [blame]
Douglas Gregor2cf26342009-04-09 22:27:44 +00001//===- PCHBitCodes.h - Enum values for the PCH bitcode format ---*- 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// This header defines Bitcode enum values for Clang precompiled header files.
11//
12// The enum values defined in this file should be considered permanent. If
13// new features are added, they should have values added at the end of the
14// respective lists.
15//
16//===----------------------------------------------------------------------===//
17#ifndef LLVM_CLANG_FRONTEND_PCHBITCODES_H
18#define LLVM_CLANG_FRONTEND_PCHBITCODES_H
19
20#include "llvm/Bitcode/BitCodes.h"
21#include "llvm/Support/DataTypes.h"
22
23namespace clang {
24 namespace pch {
Douglas Gregor8038d512009-04-10 17:25:41 +000025 /// \brief An ID number that refers to a declaration in a PCH file.
26 ///
27 /// The ID numbers of types are consecutive (in order of
28 /// discovery) and start at 2. 0 is reserved for NULL, and 1 is
29 /// reserved for the translation unit declaration.
30 typedef uint32_t DeclID;
31
32 /// \brief An ID number that refers to a type in a PCH file.
33 ///
34 /// The ID of a type is partitioned into two parts: the lower
35 /// three bits are used to store the const/volatile/restrict
36 /// qualifiers (as with QualType) and the upper bits provide a
37 /// type index. The type index values are partitioned into two
38 /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
39 /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
40 /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
41 /// other types that have serialized representations.
42 typedef uint32_t TypeID;
Douglas Gregor2cf26342009-04-09 22:27:44 +000043
Douglas Gregorafaf3082009-04-11 00:14:32 +000044 /// \brief An ID number that refers to an identifier in a PCH
45 /// file.
46 typedef uint32_t IdentID;
47
Douglas Gregor2cf26342009-04-09 22:27:44 +000048 /// \brief Describes the various kinds of blocks that occur within
49 /// a PCH file.
50 enum BlockIDs {
51 /// \brief The PCH block, which acts as a container around the
52 /// full PCH block.
53 PCH_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
Douglas Gregor14f79002009-04-10 03:52:48 +000054
Douglas Gregor14f79002009-04-10 03:52:48 +000055 /// \brief The block containing information about the source
56 /// manager.
57 SOURCE_MANAGER_BLOCK_ID,
58
59 /// \brief The block containing information about the
60 /// preprocessor.
61 PREPROCESSOR_BLOCK_ID,
62
Douglas Gregor2cf26342009-04-09 22:27:44 +000063 /// \brief The block containing the definitions of all of the
64 /// types used within the PCH file.
65 TYPES_BLOCK_ID,
66
Douglas Gregor2cf26342009-04-09 22:27:44 +000067 /// \brief The block containing the definitions of all of the
68 /// declarations stored in the PCH file.
Douglas Gregor8038d512009-04-10 17:25:41 +000069 DECLS_BLOCK_ID
70 };
Douglas Gregor2cf26342009-04-09 22:27:44 +000071
Douglas Gregor8038d512009-04-10 17:25:41 +000072 /// \brief Record types that occur within the PCH block itself.
73 enum PCHRecordTypes {
74 /// \brief Offset of each type within the types block.
Douglas Gregor2cf26342009-04-09 22:27:44 +000075 ///
Douglas Gregor8038d512009-04-10 17:25:41 +000076 /// The TYPE_OFFSET constant describes the record that occurs
77 /// within the block identified by TYPE_OFFSETS_BLOCK_ID within
78 /// the PCH file. The record itself is an array of offsets that
79 /// point into the types block (identified by TYPES_BLOCK_ID in
80 /// the PCH file). The index into the array is based on the ID
81 /// of a type. For a given type ID @c T, the lower three bits of
82 /// @c T are its qualifiers (const, volatile, restrict), as in
83 /// the QualType class. The upper bits, after being shifted and
84 /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
85 /// TYPE_OFFSET block to determine the offset of that type's
86 /// corresponding record within the TYPES_BLOCK_ID block.
87 TYPE_OFFSET = 1,
88
89 /// \brief Record code for the offsets of each decl.
90 ///
91 /// The DECL_OFFSET constant describes the record that occurs
92 /// within the block identifier by DECL_OFFSETS_BLOCK_ID within
93 /// the PCH file. The record itself is an array of offsets that
94 /// point into the declarations block (identified by
95 /// DECLS_BLOCK_ID). The declaration ID is an index into this
96 /// record, after subtracting one to account for the use of
97 /// declaration ID 0 for a NULL declaration pointer. Index 0 is
98 /// reserved for the translation unit declaration.
Douglas Gregor0a0428e2009-04-10 20:39:37 +000099 DECL_OFFSET = 2,
100
101 /// \brief Record code for the language options table.
102 ///
103 /// The record with this code contains the contents of the
104 /// LangOptions structure. We serialize the entire contents of
105 /// the structure, and let the reader decide which options are
106 /// actually important to check.
Douglas Gregor2bec0412009-04-10 21:16:55 +0000107 LANGUAGE_OPTIONS = 3,
108
109 /// \brief Record code for the target triple used to build the
110 /// PCH file.
Douglas Gregorafaf3082009-04-11 00:14:32 +0000111 TARGET_TRIPLE = 4,
112
113 /// \brief Record code for the table of offsets of each
114 /// identifier ID.
115 ///
116 /// The offset table contains offsets into the blob stored in
117 /// the IDENTIFIER_TABLE record. Each offset points to the
118 /// NULL-terminated string that corresponds to that identifier.
119 IDENTIFIER_OFFSET = 5,
120
121 /// \brief Record code for the identifier table.
122 ///
123 /// The identifier table is a simple blob that contains
124 /// NULL-terminated strings for all of the identifiers
125 /// referenced by the PCH file. The IDENTIFIER_OFFSET table
126 /// contains the mapping from identifier IDs to the characters
127 /// in this blob. Note that the starting offsets of all of the
128 /// identifiers are odd, so that, when the identifier offset
129 /// table is loaded in, we can use the low bit to distinguish
130 /// between offsets (for unresolved identifier IDs) and
131 /// IdentifierInfo pointers (for already-resolved identifier
132 /// IDs).
Douglas Gregorfdd01722009-04-14 00:24:19 +0000133 IDENTIFIER_TABLE = 6,
134
135 /// \brief Record code for the array of external definitions.
136 ///
137 /// The PCH file contains a list of all of the external
138 /// definitions present within the parsed headers, stored as an
139 /// array of declaration IDs. These external definitions will be
140 /// reported to the AST consumer after the PCH file has been
141 /// read, since their presence can affect the semantics of the
142 /// program (e.g., for code generation).
143 EXTERNAL_DEFINITIONS = 7
Douglas Gregor2cf26342009-04-09 22:27:44 +0000144 };
145
Douglas Gregor14f79002009-04-10 03:52:48 +0000146 /// \brief Record types used within a source manager block.
147 enum SourceManagerRecordTypes {
148 /// \brief Describes a source location entry (SLocEntry) for a
149 /// file.
150 SM_SLOC_FILE_ENTRY = 1,
151 /// \brief Describes a source location entry (SLocEntry) for a
152 /// buffer.
153 SM_SLOC_BUFFER_ENTRY = 2,
154 /// \brief Describes a blob that contains the data for a buffer
155 /// entry. This kind of record always directly follows a
156 /// SM_SLOC_BUFFER_ENTRY record.
157 SM_SLOC_BUFFER_BLOB = 3,
158 /// \brief Describes a source location entry (SLocEntry) for a
159 /// macro instantiation.
Douglas Gregorbd945002009-04-13 16:31:14 +0000160 SM_SLOC_INSTANTIATION_ENTRY = 4,
161 /// \brief Describes the SourceManager's line table, with
162 /// information about #line directives.
163 SM_LINE_TABLE = 5
Douglas Gregor14f79002009-04-10 03:52:48 +0000164 };
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000165
166 /// \brief Record types used within a preprocessor block.
167 enum PreprocessorRecordTypes {
168 // The macros in the PP section are a PP_MACRO_* instance followed by a
169 // list of PP_TOKEN instances for each token in the definition.
170
171 /// \brief An object-like macro definition.
172 /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
173 PP_MACRO_OBJECT_LIKE = 1,
174
175 /// \brief A function-like macro definition.
176 /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
177 /// NumArgs, ArgIdentInfoID* ]
178 PP_MACRO_FUNCTION_LIKE = 2,
179
180 /// \brief Describes one token.
Chris Lattnerc1f9d822009-04-13 01:29:17 +0000181 /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
182 PP_TOKEN = 3,
183
184 /// \brief The value of the next __COUNTER__ to dispense.
185 /// [PP_COUNTER_VALUE, Val]
186 PP_COUNTER_VALUE = 4
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000187 };
188
Douglas Gregor14f79002009-04-10 03:52:48 +0000189
190 /// \defgroup PCHAST Precompiled header AST constants
191 ///
192 /// The constants in this group describe various components of the
193 /// abstract syntax tree within a precompiled header.
194 ///
195 /// @{
196
Douglas Gregor2cf26342009-04-09 22:27:44 +0000197 /// \brief Predefined type IDs.
198 ///
199 /// These type IDs correspond to predefined types in the AST
200 /// context, such as built-in types (int) and special place-holder
201 /// types (the <overload> and <dependent> type markers). Such
202 /// types are never actually serialized, since they will be built
203 /// by the AST context when it is created.
204 enum PredefinedTypeIDs {
205 /// \brief The NULL type.
206 PREDEF_TYPE_NULL_ID = 0,
207 /// \brief The void type.
208 PREDEF_TYPE_VOID_ID = 1,
209 /// \brief The 'bool' or '_Bool' type.
210 PREDEF_TYPE_BOOL_ID = 2,
211 /// \brief The 'char' type, when it is unsigned.
212 PREDEF_TYPE_CHAR_U_ID = 3,
213 /// \brief The 'unsigned char' type.
214 PREDEF_TYPE_UCHAR_ID = 4,
215 /// \brief The 'unsigned short' type.
216 PREDEF_TYPE_USHORT_ID = 5,
217 /// \brief The 'unsigned int' type.
218 PREDEF_TYPE_UINT_ID = 6,
219 /// \brief The 'unsigned long' type.
220 PREDEF_TYPE_ULONG_ID = 7,
221 /// \brief The 'unsigned long long' type.
222 PREDEF_TYPE_ULONGLONG_ID = 8,
223 /// \brief The 'char' type, when it is signed.
224 PREDEF_TYPE_CHAR_S_ID = 9,
225 /// \brief The 'signed char' type.
226 PREDEF_TYPE_SCHAR_ID = 10,
227 /// \brief The C++ 'wchar_t' type.
228 PREDEF_TYPE_WCHAR_ID = 11,
229 /// \brief The (signed) 'short' type.
230 PREDEF_TYPE_SHORT_ID = 12,
231 /// \brief The (signed) 'int' type.
232 PREDEF_TYPE_INT_ID = 13,
233 /// \brief The (signed) 'long' type.
234 PREDEF_TYPE_LONG_ID = 14,
235 /// \brief The (signed) 'long long' type.
236 PREDEF_TYPE_LONGLONG_ID = 15,
237 /// \brief The 'float' type.
238 PREDEF_TYPE_FLOAT_ID = 16,
239 /// \brief The 'double' type.
240 PREDEF_TYPE_DOUBLE_ID = 17,
241 /// \brief The 'long double' type.
242 PREDEF_TYPE_LONGDOUBLE_ID = 18,
243 /// \brief The placeholder type for overloaded function sets.
244 PREDEF_TYPE_OVERLOAD_ID = 19,
245 /// \brief The placeholder type for dependent types.
246 PREDEF_TYPE_DEPENDENT_ID = 20
247 };
248
249 /// \brief The number of predefined type IDs that are reserved for
250 /// the PREDEF_TYPE_* constants.
251 ///
252 /// Type IDs for non-predefined types will start at
253 /// NUM_PREDEF_TYPE_IDs.
254 const unsigned NUM_PREDEF_TYPE_IDS = 100;
255
256 /// \brief Record codes for each kind of type.
257 ///
258 /// These constants describe the records that can occur within a
259 /// block identified by TYPES_BLOCK_ID in the PCH file. Each
260 /// constant describes a record for a specific type class in the
261 /// AST.
262 enum TypeCode {
263 /// \brief An ExtQualType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000264 TYPE_EXT_QUAL = 1,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000265 /// \brief A FixedWidthIntType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000266 TYPE_FIXED_WIDTH_INT = 2,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000267 /// \brief A ComplexType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000268 TYPE_COMPLEX = 3,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000269 /// \brief A PointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000270 TYPE_POINTER = 4,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000271 /// \brief A BlockPointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000272 TYPE_BLOCK_POINTER = 5,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000273 /// \brief An LValueReferenceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000274 TYPE_LVALUE_REFERENCE = 6,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000275 /// \brief An RValueReferenceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000276 TYPE_RVALUE_REFERENCE = 7,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000277 /// \brief A MemberPointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000278 TYPE_MEMBER_POINTER = 8,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000279 /// \brief A ConstantArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000280 TYPE_CONSTANT_ARRAY = 9,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000281 /// \brief An IncompleteArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000282 TYPE_INCOMPLETE_ARRAY = 10,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000283 /// \brief A VariableArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000284 TYPE_VARIABLE_ARRAY = 11,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000285 /// \brief A VectorType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000286 TYPE_VECTOR = 12,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000287 /// \brief An ExtVectorType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000288 TYPE_EXT_VECTOR = 13,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000289 /// \brief A FunctionNoProtoType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000290 TYPE_FUNCTION_NO_PROTO = 14,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000291 /// \brief A FunctionProtoType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000292 TYPE_FUNCTION_PROTO = 15,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000293 /// \brief A TypedefType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000294 TYPE_TYPEDEF = 16,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000295 /// \brief A TypeOfExprType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000296 TYPE_TYPEOF_EXPR = 17,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000297 /// \brief A TypeOfType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000298 TYPE_TYPEOF = 18,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000299 /// \brief A RecordType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000300 TYPE_RECORD = 19,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000301 /// \brief An EnumType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000302 TYPE_ENUM = 20,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000303 /// \brief An ObjCInterfaceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000304 TYPE_OBJC_INTERFACE = 21,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000305 /// \brief An ObjCQualifiedInterfaceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000306 TYPE_OBJC_QUALIFIED_INTERFACE = 22,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000307 /// \brief An ObjCQualifiedIdType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000308 TYPE_OBJC_QUALIFIED_ID = 23,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000309 /// \brief An ObjCQualifiedClassType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000310 TYPE_OBJC_QUALIFIED_CLASS = 24
Douglas Gregor2cf26342009-04-09 22:27:44 +0000311 };
312
Douglas Gregor2cf26342009-04-09 22:27:44 +0000313 /// \brief Record codes for each kind of declaration.
314 ///
315 /// These constants describe the records that can occur within a
316 /// declarations block (identified by DECLS_BLOCK_ID). Each
317 /// constant describes a record for a specific declaration class
318 /// in the AST.
319 enum DeclCode {
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000320 /// \brief Attributes attached to a declaration.
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000321 DECL_ATTR = 1,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000322 /// \brief A TranslationUnitDecl record.
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000323 DECL_TRANSLATION_UNIT,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000324 /// \brief A TypedefDecl record.
325 DECL_TYPEDEF,
Douglas Gregor0a2b45e2009-04-13 18:14:40 +0000326 /// \brief An EnumDecl record.
327 DECL_ENUM,
Douglas Gregor8c700062009-04-13 21:20:57 +0000328 /// \brief A RecordDecl record.
329 DECL_RECORD,
Douglas Gregor0a2b45e2009-04-13 18:14:40 +0000330 /// \brief An EnumConstantDecl record.
331 DECL_ENUM_CONSTANT,
Douglas Gregor3a2f7e42009-04-13 22:18:37 +0000332 /// \brief A FunctionDecl record.
333 DECL_FUNCTION,
Douglas Gregor8c700062009-04-13 21:20:57 +0000334 /// \brief A FieldDecl record.
335 DECL_FIELD,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000336 /// \brief A VarDecl record.
337 DECL_VAR,
Douglas Gregor3a2f7e42009-04-13 22:18:37 +0000338 /// \brief A ParmVarDecl record.
339 DECL_PARM_VAR,
340 /// \brief An OriginalParmVarDecl record.
341 DECL_ORIGINAL_PARM_VAR,
Douglas Gregor1028bc62009-04-13 22:49:25 +0000342 /// \brief A FileScopeAsmDecl record.
343 DECL_FILE_SCOPE_ASM,
344 /// \brief A BlockDecl record.
345 DECL_BLOCK,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000346 /// \brief A record that stores the set of declarations that are
347 /// lexically stored within a given DeclContext.
348 ///
349 /// The record itself is an array of declaration IDs, in the
350 /// order in which those declarations were added to the
351 /// declaration context. This data is used when iterating over
352 /// the contents of a DeclContext, e.g., via
353 /// DeclContext::decls_begin()/DeclContext::decls_end().
354 DECL_CONTEXT_LEXICAL,
355 /// \brief A record that stores the set of declarations that are
356 /// visible from a given DeclContext.
357 ///
358 /// The record itself stores a set of mappings, each of which
359 /// associates a declaration name with one or more declaration
360 /// IDs. This data is used when performing qualified name lookup
361 /// into a DeclContext via DeclContext::lookup.
362 DECL_CONTEXT_VISIBLE
363 };
Douglas Gregor0b748912009-04-14 21:18:50 +0000364
365 /// \brief Record codes for each kind of statement or expression.
366 ///
367 /// These constants describe the records that describe statements
368 /// or expressions. These records can occur within either the type
369 /// or declaration blocks, so they begin with record values of
370 /// 100. Each constant describes a record for a specific
371 /// statement or expression class in the AST.
372 enum StmtCode {
Douglas Gregor087fd532009-04-14 23:32:43 +0000373 /// \brief A marker record that indicates that we are at the end
374 /// of an expression.
Douglas Gregorc9490c02009-04-16 22:23:12 +0000375 STMT_STOP,
Douglas Gregor0b748912009-04-14 21:18:50 +0000376 /// \brief A NULL expression.
Douglas Gregorc9490c02009-04-16 22:23:12 +0000377 STMT_NULL_PTR,
Douglas Gregor025452f2009-04-17 00:04:06 +0000378 /// \brief A NullStmt record.
379 STMT_NULL,
380 /// \brief A CompoundStmt record.
381 STMT_COMPOUND,
382 /// \brief A CaseStmt record.
383 STMT_CASE,
384 /// \brief A DefaultStmt record.
385 STMT_DEFAULT,
Douglas Gregor1de05fe2009-04-17 18:18:49 +0000386 /// \brief A LabelStmt record.
387 STMT_LABEL,
Douglas Gregor025452f2009-04-17 00:04:06 +0000388 /// \brief An IfStmt record.
389 STMT_IF,
390 /// \brief A SwitchStmt record.
391 STMT_SWITCH,
Douglas Gregord921cf92009-04-17 00:16:09 +0000392 /// \brief A WhileStmt record.
393 STMT_WHILE,
Douglas Gregor67d82492009-04-17 00:29:51 +0000394 /// \brief A DoStmt record.
395 STMT_DO,
396 /// \brief A ForStmt record.
397 STMT_FOR,
Douglas Gregor1de05fe2009-04-17 18:18:49 +0000398 /// \brief A GotoStmt record.
399 STMT_GOTO,
Douglas Gregor7d5c2f22009-04-17 18:58:21 +0000400 /// \brief An IndirectGotoStmt record.
401 STMT_INDIRECT_GOTO,
Douglas Gregord921cf92009-04-17 00:16:09 +0000402 /// \brief A ContinueStmt record.
403 STMT_CONTINUE,
Douglas Gregor025452f2009-04-17 00:04:06 +0000404 /// \brief A BreakStmt record.
405 STMT_BREAK,
Douglas Gregor0de9d882009-04-17 16:34:57 +0000406 /// \brief A ReturnStmt record.
407 STMT_RETURN,
Douglas Gregor84f21702009-04-17 16:55:36 +0000408 /// \brief A DeclStmt record.
409 STMT_DECL,
Douglas Gregorcd7d5a92009-04-17 20:57:14 +0000410 /// \brief An AsmStmt record.
411 STMT_ASM,
Douglas Gregor17fc2232009-04-14 21:55:33 +0000412 /// \brief A PredefinedExpr record.
413 EXPR_PREDEFINED,
Douglas Gregor0b748912009-04-14 21:18:50 +0000414 /// \brief A DeclRefExpr record.
415 EXPR_DECL_REF,
416 /// \brief An IntegerLiteral record.
417 EXPR_INTEGER_LITERAL,
Douglas Gregor17fc2232009-04-14 21:55:33 +0000418 /// \brief A FloatingLiteral record.
419 EXPR_FLOATING_LITERAL,
Douglas Gregorcb2ca732009-04-15 22:19:53 +0000420 /// \brief An ImaginaryLiteral record.
421 EXPR_IMAGINARY_LITERAL,
Douglas Gregor673ecd62009-04-15 16:35:07 +0000422 /// \brief A StringLiteral record.
423 EXPR_STRING_LITERAL,
Douglas Gregor0b748912009-04-14 21:18:50 +0000424 /// \brief A CharacterLiteral record.
Douglas Gregor087fd532009-04-14 23:32:43 +0000425 EXPR_CHARACTER_LITERAL,
Douglas Gregorc04db4f2009-04-14 23:59:37 +0000426 /// \brief A ParenExpr record.
427 EXPR_PAREN,
Douglas Gregor0b0b77f2009-04-15 15:58:59 +0000428 /// \brief A UnaryOperator record.
429 EXPR_UNARY_OPERATOR,
430 /// \brief A SizefAlignOfExpr record.
431 EXPR_SIZEOF_ALIGN_OF,
Douglas Gregorcb2ca732009-04-15 22:19:53 +0000432 /// \brief An ArraySubscriptExpr record.
433 EXPR_ARRAY_SUBSCRIPT,
Douglas Gregor1f0d0132009-04-15 17:43:59 +0000434 /// \brief A CallExpr record.
435 EXPR_CALL,
436 /// \brief A MemberExpr record.
437 EXPR_MEMBER,
Douglas Gregordb600c32009-04-15 00:25:59 +0000438 /// \brief A BinaryOperator record.
439 EXPR_BINARY_OPERATOR,
Douglas Gregorad90e962009-04-15 22:40:36 +0000440 /// \brief A CompoundAssignOperator record.
441 EXPR_COMPOUND_ASSIGN_OPERATOR,
442 /// \brief A ConditionOperator record.
443 EXPR_CONDITIONAL_OPERATOR,
Douglas Gregor087fd532009-04-14 23:32:43 +0000444 /// \brief An ImplicitCastExpr record.
Douglas Gregordb600c32009-04-15 00:25:59 +0000445 EXPR_IMPLICIT_CAST,
446 /// \brief A CStyleCastExpr record.
Douglas Gregord3c98a02009-04-15 23:02:49 +0000447 EXPR_CSTYLE_CAST,
Douglas Gregorba6d7e72009-04-16 02:33:48 +0000448 /// \brief A CompoundLiteralExpr record.
449 EXPR_COMPOUND_LITERAL,
Douglas Gregord3c98a02009-04-15 23:02:49 +0000450 /// \brief An ExtVectorElementExpr record.
451 EXPR_EXT_VECTOR_ELEMENT,
Douglas Gregord077d752009-04-16 00:55:48 +0000452 /// \brief An InitListExpr record.
453 EXPR_INIT_LIST,
454 /// \brief A DesignatedInitExpr record.
455 EXPR_DESIGNATED_INIT,
456 /// \brief An ImplicitValueInitExpr record.
457 EXPR_IMPLICIT_VALUE_INIT,
Douglas Gregord3c98a02009-04-15 23:02:49 +0000458 /// \brief A VAArgExpr record.
Douglas Gregor44cae0c2009-04-15 23:33:31 +0000459 EXPR_VA_ARG,
Douglas Gregor6a2dd552009-04-17 19:05:30 +0000460 /// \brief An AddrLabelExpr record.
Douglas Gregor7d5c2f22009-04-17 18:58:21 +0000461 EXPR_ADDR_LABEL,
Douglas Gregor6a2dd552009-04-17 19:05:30 +0000462 /// \brief A StmtExpr record.
463 EXPR_STMT,
Douglas Gregor44cae0c2009-04-15 23:33:31 +0000464 /// \brief A TypesCompatibleExpr record.
465 EXPR_TYPES_COMPATIBLE,
466 /// \brief A ChooseExpr record.
467 EXPR_CHOOSE,
468 /// \brief A GNUNullExpr record.
Douglas Gregor94cd5d12009-04-16 00:01:45 +0000469 EXPR_GNU_NULL,
470 /// \brief A ShuffleVectorExpr record.
471 EXPR_SHUFFLE_VECTOR,
Douglas Gregor84af7c22009-04-17 19:21:43 +0000472 /// \brief BlockExpr
473 EXPR_BLOCK,
474 /// \brief A BlockDeclRef record.
Douglas Gregor94cd5d12009-04-16 00:01:45 +0000475 EXPR_BLOCK_DECL_REF
Douglas Gregor0b748912009-04-14 21:18:50 +0000476 };
Douglas Gregord077d752009-04-16 00:55:48 +0000477
478 /// \brief The kinds of designators that can occur in a
479 /// DesignatedInitExpr.
480 enum DesignatorTypes {
481 /// \brief Field designator where only the field name is known.
482 DESIG_FIELD_NAME = 0,
483 /// \brief Field designator where the field has been resolved to
484 /// a declaration.
485 DESIG_FIELD_DECL = 1,
486 /// \brief Array designator.
487 DESIG_ARRAY = 2,
488 /// \brief GNU array range designator.
489 DESIG_ARRAY_RANGE = 3
490 };
491
Douglas Gregor14f79002009-04-10 03:52:48 +0000492 /// @}
Douglas Gregor2cf26342009-04-09 22:27:44 +0000493 }
494} // end namespace clang
495
496#endif