blob: c1e6a8f493c86f81acd251eb161c4e451b1e5d96 [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).
Douglas Gregor3e1af842009-04-17 22:13:46 +0000143 EXTERNAL_DEFINITIONS = 7,
144
Douglas Gregorad1de002009-04-18 05:55:16 +0000145 /// \brief Record code for the set of non-builtin, special
146 /// types.
147 ///
148 /// This record contains the type IDs for the various type nodes
149 /// that are constructed during semantic analysis (e.g.,
150 /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
151 /// offsets into this record.
152 SPECIAL_TYPES = 8,
153
Douglas Gregor3e1af842009-04-17 22:13:46 +0000154 /// \brief Record code for the block of extra statistics we
155 /// gather while generating a PCH file.
Douglas Gregorad1de002009-04-18 05:55:16 +0000156 STATISTICS = 9
Douglas Gregor2cf26342009-04-09 22:27:44 +0000157 };
158
Douglas Gregor14f79002009-04-10 03:52:48 +0000159 /// \brief Record types used within a source manager block.
160 enum SourceManagerRecordTypes {
161 /// \brief Describes a source location entry (SLocEntry) for a
162 /// file.
163 SM_SLOC_FILE_ENTRY = 1,
164 /// \brief Describes a source location entry (SLocEntry) for a
165 /// buffer.
166 SM_SLOC_BUFFER_ENTRY = 2,
167 /// \brief Describes a blob that contains the data for a buffer
168 /// entry. This kind of record always directly follows a
169 /// SM_SLOC_BUFFER_ENTRY record.
170 SM_SLOC_BUFFER_BLOB = 3,
171 /// \brief Describes a source location entry (SLocEntry) for a
172 /// macro instantiation.
Douglas Gregorbd945002009-04-13 16:31:14 +0000173 SM_SLOC_INSTANTIATION_ENTRY = 4,
174 /// \brief Describes the SourceManager's line table, with
175 /// information about #line directives.
176 SM_LINE_TABLE = 5
Douglas Gregor14f79002009-04-10 03:52:48 +0000177 };
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000178
179 /// \brief Record types used within a preprocessor block.
180 enum PreprocessorRecordTypes {
181 // The macros in the PP section are a PP_MACRO_* instance followed by a
182 // list of PP_TOKEN instances for each token in the definition.
183
184 /// \brief An object-like macro definition.
185 /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
186 PP_MACRO_OBJECT_LIKE = 1,
187
188 /// \brief A function-like macro definition.
189 /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
190 /// NumArgs, ArgIdentInfoID* ]
191 PP_MACRO_FUNCTION_LIKE = 2,
192
193 /// \brief Describes one token.
Chris Lattnerc1f9d822009-04-13 01:29:17 +0000194 /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
195 PP_TOKEN = 3,
196
197 /// \brief The value of the next __COUNTER__ to dispense.
198 /// [PP_COUNTER_VALUE, Val]
199 PP_COUNTER_VALUE = 4
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000200 };
201
Douglas Gregor14f79002009-04-10 03:52:48 +0000202
203 /// \defgroup PCHAST Precompiled header AST constants
204 ///
205 /// The constants in this group describe various components of the
206 /// abstract syntax tree within a precompiled header.
207 ///
208 /// @{
209
Douglas Gregor2cf26342009-04-09 22:27:44 +0000210 /// \brief Predefined type IDs.
211 ///
212 /// These type IDs correspond to predefined types in the AST
213 /// context, such as built-in types (int) and special place-holder
214 /// types (the <overload> and <dependent> type markers). Such
215 /// types are never actually serialized, since they will be built
216 /// by the AST context when it is created.
217 enum PredefinedTypeIDs {
218 /// \brief The NULL type.
219 PREDEF_TYPE_NULL_ID = 0,
220 /// \brief The void type.
221 PREDEF_TYPE_VOID_ID = 1,
222 /// \brief The 'bool' or '_Bool' type.
223 PREDEF_TYPE_BOOL_ID = 2,
224 /// \brief The 'char' type, when it is unsigned.
225 PREDEF_TYPE_CHAR_U_ID = 3,
226 /// \brief The 'unsigned char' type.
227 PREDEF_TYPE_UCHAR_ID = 4,
228 /// \brief The 'unsigned short' type.
229 PREDEF_TYPE_USHORT_ID = 5,
230 /// \brief The 'unsigned int' type.
231 PREDEF_TYPE_UINT_ID = 6,
232 /// \brief The 'unsigned long' type.
233 PREDEF_TYPE_ULONG_ID = 7,
234 /// \brief The 'unsigned long long' type.
235 PREDEF_TYPE_ULONGLONG_ID = 8,
236 /// \brief The 'char' type, when it is signed.
237 PREDEF_TYPE_CHAR_S_ID = 9,
238 /// \brief The 'signed char' type.
239 PREDEF_TYPE_SCHAR_ID = 10,
240 /// \brief The C++ 'wchar_t' type.
241 PREDEF_TYPE_WCHAR_ID = 11,
242 /// \brief The (signed) 'short' type.
243 PREDEF_TYPE_SHORT_ID = 12,
244 /// \brief The (signed) 'int' type.
245 PREDEF_TYPE_INT_ID = 13,
246 /// \brief The (signed) 'long' type.
247 PREDEF_TYPE_LONG_ID = 14,
248 /// \brief The (signed) 'long long' type.
249 PREDEF_TYPE_LONGLONG_ID = 15,
250 /// \brief The 'float' type.
251 PREDEF_TYPE_FLOAT_ID = 16,
252 /// \brief The 'double' type.
253 PREDEF_TYPE_DOUBLE_ID = 17,
254 /// \brief The 'long double' type.
255 PREDEF_TYPE_LONGDOUBLE_ID = 18,
256 /// \brief The placeholder type for overloaded function sets.
257 PREDEF_TYPE_OVERLOAD_ID = 19,
258 /// \brief The placeholder type for dependent types.
259 PREDEF_TYPE_DEPENDENT_ID = 20
260 };
261
262 /// \brief The number of predefined type IDs that are reserved for
263 /// the PREDEF_TYPE_* constants.
264 ///
265 /// Type IDs for non-predefined types will start at
266 /// NUM_PREDEF_TYPE_IDs.
267 const unsigned NUM_PREDEF_TYPE_IDS = 100;
268
269 /// \brief Record codes for each kind of type.
270 ///
271 /// These constants describe the records that can occur within a
272 /// block identified by TYPES_BLOCK_ID in the PCH file. Each
273 /// constant describes a record for a specific type class in the
274 /// AST.
275 enum TypeCode {
276 /// \brief An ExtQualType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000277 TYPE_EXT_QUAL = 1,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000278 /// \brief A FixedWidthIntType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000279 TYPE_FIXED_WIDTH_INT = 2,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000280 /// \brief A ComplexType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000281 TYPE_COMPLEX = 3,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000282 /// \brief A PointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000283 TYPE_POINTER = 4,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000284 /// \brief A BlockPointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000285 TYPE_BLOCK_POINTER = 5,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000286 /// \brief An LValueReferenceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000287 TYPE_LVALUE_REFERENCE = 6,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000288 /// \brief An RValueReferenceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000289 TYPE_RVALUE_REFERENCE = 7,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000290 /// \brief A MemberPointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000291 TYPE_MEMBER_POINTER = 8,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000292 /// \brief A ConstantArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000293 TYPE_CONSTANT_ARRAY = 9,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000294 /// \brief An IncompleteArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000295 TYPE_INCOMPLETE_ARRAY = 10,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000296 /// \brief A VariableArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000297 TYPE_VARIABLE_ARRAY = 11,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000298 /// \brief A VectorType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000299 TYPE_VECTOR = 12,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000300 /// \brief An ExtVectorType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000301 TYPE_EXT_VECTOR = 13,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000302 /// \brief A FunctionNoProtoType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000303 TYPE_FUNCTION_NO_PROTO = 14,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000304 /// \brief A FunctionProtoType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000305 TYPE_FUNCTION_PROTO = 15,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000306 /// \brief A TypedefType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000307 TYPE_TYPEDEF = 16,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000308 /// \brief A TypeOfExprType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000309 TYPE_TYPEOF_EXPR = 17,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000310 /// \brief A TypeOfType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000311 TYPE_TYPEOF = 18,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000312 /// \brief A RecordType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000313 TYPE_RECORD = 19,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000314 /// \brief An EnumType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000315 TYPE_ENUM = 20,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000316 /// \brief An ObjCInterfaceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000317 TYPE_OBJC_INTERFACE = 21,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000318 /// \brief An ObjCQualifiedInterfaceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000319 TYPE_OBJC_QUALIFIED_INTERFACE = 22,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000320 /// \brief An ObjCQualifiedIdType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000321 TYPE_OBJC_QUALIFIED_ID = 23,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000322 /// \brief An ObjCQualifiedClassType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000323 TYPE_OBJC_QUALIFIED_CLASS = 24
Douglas Gregor2cf26342009-04-09 22:27:44 +0000324 };
325
Douglas Gregorad1de002009-04-18 05:55:16 +0000326 /// \brief The type IDs for special types constructed by semantic
327 /// analysis.
328 ///
329 /// The constants in this enumeration are indices into the
330 /// SPECIAL_TYPES record.
331 enum SpecialTypeIDs {
332 /// \brief __builtin_va_list
333 SPECIAL_TYPE_BUILTIN_VA_LIST = 0
334 };
335
Douglas Gregor2cf26342009-04-09 22:27:44 +0000336 /// \brief Record codes for each kind of declaration.
337 ///
338 /// These constants describe the records that can occur within a
339 /// declarations block (identified by DECLS_BLOCK_ID). Each
340 /// constant describes a record for a specific declaration class
341 /// in the AST.
342 enum DeclCode {
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000343 /// \brief Attributes attached to a declaration.
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000344 DECL_ATTR = 1,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000345 /// \brief A TranslationUnitDecl record.
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000346 DECL_TRANSLATION_UNIT,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000347 /// \brief A TypedefDecl record.
348 DECL_TYPEDEF,
Douglas Gregor0a2b45e2009-04-13 18:14:40 +0000349 /// \brief An EnumDecl record.
350 DECL_ENUM,
Douglas Gregor8c700062009-04-13 21:20:57 +0000351 /// \brief A RecordDecl record.
352 DECL_RECORD,
Douglas Gregor0a2b45e2009-04-13 18:14:40 +0000353 /// \brief An EnumConstantDecl record.
354 DECL_ENUM_CONSTANT,
Douglas Gregor3a2f7e42009-04-13 22:18:37 +0000355 /// \brief A FunctionDecl record.
356 DECL_FUNCTION,
Steve Naroff53c9d8a2009-04-20 15:06:07 +0000357 /// \brief A ObjCMethodDecl record.
358 DECL_OBJC_METHOD,
Douglas Gregor8c700062009-04-13 21:20:57 +0000359 /// \brief A FieldDecl record.
360 DECL_FIELD,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000361 /// \brief A VarDecl record.
362 DECL_VAR,
Douglas Gregor3a2f7e42009-04-13 22:18:37 +0000363 /// \brief A ParmVarDecl record.
364 DECL_PARM_VAR,
365 /// \brief An OriginalParmVarDecl record.
366 DECL_ORIGINAL_PARM_VAR,
Douglas Gregor1028bc62009-04-13 22:49:25 +0000367 /// \brief A FileScopeAsmDecl record.
368 DECL_FILE_SCOPE_ASM,
369 /// \brief A BlockDecl record.
370 DECL_BLOCK,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000371 /// \brief A record that stores the set of declarations that are
372 /// lexically stored within a given DeclContext.
373 ///
374 /// The record itself is an array of declaration IDs, in the
375 /// order in which those declarations were added to the
376 /// declaration context. This data is used when iterating over
377 /// the contents of a DeclContext, e.g., via
378 /// DeclContext::decls_begin()/DeclContext::decls_end().
379 DECL_CONTEXT_LEXICAL,
380 /// \brief A record that stores the set of declarations that are
381 /// visible from a given DeclContext.
382 ///
383 /// The record itself stores a set of mappings, each of which
384 /// associates a declaration name with one or more declaration
385 /// IDs. This data is used when performing qualified name lookup
386 /// into a DeclContext via DeclContext::lookup.
387 DECL_CONTEXT_VISIBLE
388 };
Douglas Gregor0b748912009-04-14 21:18:50 +0000389
390 /// \brief Record codes for each kind of statement or expression.
391 ///
392 /// These constants describe the records that describe statements
393 /// or expressions. These records can occur within either the type
394 /// or declaration blocks, so they begin with record values of
395 /// 100. Each constant describes a record for a specific
396 /// statement or expression class in the AST.
397 enum StmtCode {
Douglas Gregor087fd532009-04-14 23:32:43 +0000398 /// \brief A marker record that indicates that we are at the end
399 /// of an expression.
Douglas Gregorc9490c02009-04-16 22:23:12 +0000400 STMT_STOP,
Douglas Gregor0b748912009-04-14 21:18:50 +0000401 /// \brief A NULL expression.
Douglas Gregorc9490c02009-04-16 22:23:12 +0000402 STMT_NULL_PTR,
Douglas Gregor025452f2009-04-17 00:04:06 +0000403 /// \brief A NullStmt record.
404 STMT_NULL,
405 /// \brief A CompoundStmt record.
406 STMT_COMPOUND,
407 /// \brief A CaseStmt record.
408 STMT_CASE,
409 /// \brief A DefaultStmt record.
410 STMT_DEFAULT,
Douglas Gregor1de05fe2009-04-17 18:18:49 +0000411 /// \brief A LabelStmt record.
412 STMT_LABEL,
Douglas Gregor025452f2009-04-17 00:04:06 +0000413 /// \brief An IfStmt record.
414 STMT_IF,
415 /// \brief A SwitchStmt record.
416 STMT_SWITCH,
Douglas Gregord921cf92009-04-17 00:16:09 +0000417 /// \brief A WhileStmt record.
418 STMT_WHILE,
Douglas Gregor67d82492009-04-17 00:29:51 +0000419 /// \brief A DoStmt record.
420 STMT_DO,
421 /// \brief A ForStmt record.
422 STMT_FOR,
Douglas Gregor1de05fe2009-04-17 18:18:49 +0000423 /// \brief A GotoStmt record.
424 STMT_GOTO,
Douglas Gregor7d5c2f22009-04-17 18:58:21 +0000425 /// \brief An IndirectGotoStmt record.
426 STMT_INDIRECT_GOTO,
Douglas Gregord921cf92009-04-17 00:16:09 +0000427 /// \brief A ContinueStmt record.
428 STMT_CONTINUE,
Douglas Gregor025452f2009-04-17 00:04:06 +0000429 /// \brief A BreakStmt record.
430 STMT_BREAK,
Douglas Gregor0de9d882009-04-17 16:34:57 +0000431 /// \brief A ReturnStmt record.
432 STMT_RETURN,
Douglas Gregor84f21702009-04-17 16:55:36 +0000433 /// \brief A DeclStmt record.
434 STMT_DECL,
Douglas Gregorcd7d5a92009-04-17 20:57:14 +0000435 /// \brief An AsmStmt record.
436 STMT_ASM,
Douglas Gregor17fc2232009-04-14 21:55:33 +0000437 /// \brief A PredefinedExpr record.
438 EXPR_PREDEFINED,
Douglas Gregor0b748912009-04-14 21:18:50 +0000439 /// \brief A DeclRefExpr record.
440 EXPR_DECL_REF,
441 /// \brief An IntegerLiteral record.
442 EXPR_INTEGER_LITERAL,
Douglas Gregor17fc2232009-04-14 21:55:33 +0000443 /// \brief A FloatingLiteral record.
444 EXPR_FLOATING_LITERAL,
Douglas Gregorcb2ca732009-04-15 22:19:53 +0000445 /// \brief An ImaginaryLiteral record.
446 EXPR_IMAGINARY_LITERAL,
Douglas Gregor673ecd62009-04-15 16:35:07 +0000447 /// \brief A StringLiteral record.
448 EXPR_STRING_LITERAL,
Douglas Gregor0b748912009-04-14 21:18:50 +0000449 /// \brief A CharacterLiteral record.
Douglas Gregor087fd532009-04-14 23:32:43 +0000450 EXPR_CHARACTER_LITERAL,
Douglas Gregorc04db4f2009-04-14 23:59:37 +0000451 /// \brief A ParenExpr record.
452 EXPR_PAREN,
Douglas Gregor0b0b77f2009-04-15 15:58:59 +0000453 /// \brief A UnaryOperator record.
454 EXPR_UNARY_OPERATOR,
455 /// \brief A SizefAlignOfExpr record.
456 EXPR_SIZEOF_ALIGN_OF,
Douglas Gregorcb2ca732009-04-15 22:19:53 +0000457 /// \brief An ArraySubscriptExpr record.
458 EXPR_ARRAY_SUBSCRIPT,
Douglas Gregor1f0d0132009-04-15 17:43:59 +0000459 /// \brief A CallExpr record.
460 EXPR_CALL,
461 /// \brief A MemberExpr record.
462 EXPR_MEMBER,
Douglas Gregordb600c32009-04-15 00:25:59 +0000463 /// \brief A BinaryOperator record.
464 EXPR_BINARY_OPERATOR,
Douglas Gregorad90e962009-04-15 22:40:36 +0000465 /// \brief A CompoundAssignOperator record.
466 EXPR_COMPOUND_ASSIGN_OPERATOR,
467 /// \brief A ConditionOperator record.
468 EXPR_CONDITIONAL_OPERATOR,
Douglas Gregor087fd532009-04-14 23:32:43 +0000469 /// \brief An ImplicitCastExpr record.
Douglas Gregordb600c32009-04-15 00:25:59 +0000470 EXPR_IMPLICIT_CAST,
471 /// \brief A CStyleCastExpr record.
Douglas Gregord3c98a02009-04-15 23:02:49 +0000472 EXPR_CSTYLE_CAST,
Douglas Gregorba6d7e72009-04-16 02:33:48 +0000473 /// \brief A CompoundLiteralExpr record.
474 EXPR_COMPOUND_LITERAL,
Douglas Gregord3c98a02009-04-15 23:02:49 +0000475 /// \brief An ExtVectorElementExpr record.
476 EXPR_EXT_VECTOR_ELEMENT,
Douglas Gregord077d752009-04-16 00:55:48 +0000477 /// \brief An InitListExpr record.
478 EXPR_INIT_LIST,
479 /// \brief A DesignatedInitExpr record.
480 EXPR_DESIGNATED_INIT,
481 /// \brief An ImplicitValueInitExpr record.
482 EXPR_IMPLICIT_VALUE_INIT,
Douglas Gregord3c98a02009-04-15 23:02:49 +0000483 /// \brief A VAArgExpr record.
Douglas Gregor44cae0c2009-04-15 23:33:31 +0000484 EXPR_VA_ARG,
Douglas Gregor6a2dd552009-04-17 19:05:30 +0000485 /// \brief An AddrLabelExpr record.
Douglas Gregor7d5c2f22009-04-17 18:58:21 +0000486 EXPR_ADDR_LABEL,
Douglas Gregor6a2dd552009-04-17 19:05:30 +0000487 /// \brief A StmtExpr record.
488 EXPR_STMT,
Douglas Gregor44cae0c2009-04-15 23:33:31 +0000489 /// \brief A TypesCompatibleExpr record.
490 EXPR_TYPES_COMPATIBLE,
491 /// \brief A ChooseExpr record.
492 EXPR_CHOOSE,
493 /// \brief A GNUNullExpr record.
Douglas Gregor94cd5d12009-04-16 00:01:45 +0000494 EXPR_GNU_NULL,
495 /// \brief A ShuffleVectorExpr record.
496 EXPR_SHUFFLE_VECTOR,
Douglas Gregor84af7c22009-04-17 19:21:43 +0000497 /// \brief BlockExpr
498 EXPR_BLOCK,
499 /// \brief A BlockDeclRef record.
Douglas Gregor94cd5d12009-04-16 00:01:45 +0000500 EXPR_BLOCK_DECL_REF
Douglas Gregor0b748912009-04-14 21:18:50 +0000501 };
Douglas Gregord077d752009-04-16 00:55:48 +0000502
503 /// \brief The kinds of designators that can occur in a
504 /// DesignatedInitExpr.
505 enum DesignatorTypes {
506 /// \brief Field designator where only the field name is known.
507 DESIG_FIELD_NAME = 0,
508 /// \brief Field designator where the field has been resolved to
509 /// a declaration.
510 DESIG_FIELD_DECL = 1,
511 /// \brief Array designator.
512 DESIG_ARRAY = 2,
513 /// \brief GNU array range designator.
514 DESIG_ARRAY_RANGE = 3
515 };
516
Douglas Gregor14f79002009-04-10 03:52:48 +0000517 /// @}
Douglas Gregor2cf26342009-04-09 22:27:44 +0000518 }
519} // end namespace clang
520
521#endif