blob: 109a78bd8849e822117b5e5fc2ac0713dceee0f8 [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"
Chandler Carruth9f8eb202009-10-26 01:37:10 +000021#include "llvm/System/DataTypes.h"
Douglas Gregor2cf26342009-04-09 22:27:44 +000022
23namespace clang {
24 namespace pch {
Douglas Gregorab41e632009-04-27 22:23:34 +000025 /// \brief PCH major version number supported by this version of
26 /// Clang.
27 ///
28 /// Whenever the PCH format changes in a way that makes it
29 /// incompatible with previous versions (such that a reader
30 /// designed for the previous version could not support reading
31 /// the new version), this number should be increased.
Douglas Gregor445e23e2009-10-05 21:07:28 +000032 ///
Sebastian Redla93e3b52010-07-08 22:01:51 +000033 /// Version 4 of PCH files also requires that the version control branch and
Douglas Gregor445e23e2009-10-05 21:07:28 +000034 /// revision match exactly, since there is no backward compatibility of
35 /// PCH files at this time.
Sebastian Redla93e3b52010-07-08 22:01:51 +000036 const unsigned VERSION_MAJOR = 4;
Douglas Gregorab41e632009-04-27 22:23:34 +000037
38 /// \brief PCH minor version number supported by this version of
39 /// Clang.
40 ///
41 /// Whenever the PCH format changes in a way that is still
42 /// compatible with previous versions (such that a reader designed
43 /// for the previous version could still support reading the new
44 /// version by ignoring new kinds of subblocks), this number
45 /// should be increased.
46 const unsigned VERSION_MINOR = 0;
47
Douglas Gregor8038d512009-04-10 17:25:41 +000048 /// \brief An ID number that refers to a declaration in a PCH file.
49 ///
Sebastian Redla93e3b52010-07-08 22:01:51 +000050 /// The ID numbers of declarations are consecutive (in order of
Douglas Gregor8038d512009-04-10 17:25:41 +000051 /// discovery) and start at 2. 0 is reserved for NULL, and 1 is
52 /// reserved for the translation unit declaration.
53 typedef uint32_t DeclID;
54
55 /// \brief An ID number that refers to a type in a PCH file.
56 ///
57 /// The ID of a type is partitioned into two parts: the lower
58 /// three bits are used to store the const/volatile/restrict
59 /// qualifiers (as with QualType) and the upper bits provide a
60 /// type index. The type index values are partitioned into two
61 /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
62 /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
63 /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
64 /// other types that have serialized representations.
65 typedef uint32_t TypeID;
Douglas Gregor2cf26342009-04-09 22:27:44 +000066
Douglas Gregorafaf3082009-04-11 00:14:32 +000067 /// \brief An ID number that refers to an identifier in a PCH
68 /// file.
69 typedef uint32_t IdentID;
70
Steve Naroff90cd1bb2009-04-23 10:39:46 +000071 typedef uint32_t SelectorID;
Mike Stump1eb44332009-09-09 15:08:12 +000072
Douglas Gregor2cf26342009-04-09 22:27:44 +000073 /// \brief Describes the various kinds of blocks that occur within
74 /// a PCH file.
75 enum BlockIDs {
76 /// \brief The PCH block, which acts as a container around the
77 /// full PCH block.
78 PCH_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
Douglas Gregor14f79002009-04-10 03:52:48 +000079
Douglas Gregor14f79002009-04-10 03:52:48 +000080 /// \brief The block containing information about the source
81 /// manager.
82 SOURCE_MANAGER_BLOCK_ID,
83
84 /// \brief The block containing information about the
85 /// preprocessor.
86 PREPROCESSOR_BLOCK_ID,
87
Douglas Gregor2cf26342009-04-09 22:27:44 +000088 /// \brief The block containing the definitions of all of the
Douglas Gregor61d60ee2009-10-17 00:13:19 +000089 /// types and decls used within the PCH file.
90 DECLTYPES_BLOCK_ID
Douglas Gregor8038d512009-04-10 17:25:41 +000091 };
Douglas Gregor2cf26342009-04-09 22:27:44 +000092
Douglas Gregor8038d512009-04-10 17:25:41 +000093 /// \brief Record types that occur within the PCH block itself.
94 enum PCHRecordTypes {
Douglas Gregor61d60ee2009-10-17 00:13:19 +000095 /// \brief Record code for the offsets of each type.
Douglas Gregor2cf26342009-04-09 22:27:44 +000096 ///
Douglas Gregor8038d512009-04-10 17:25:41 +000097 /// The TYPE_OFFSET constant describes the record that occurs
Douglas Gregor61d60ee2009-10-17 00:13:19 +000098 /// within the PCH block. The record itself is an array of offsets that
99 /// point into the declarations and types block (identified by
100 /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
Douglas Gregor8038d512009-04-10 17:25:41 +0000101 /// of a type. For a given type ID @c T, the lower three bits of
102 /// @c T are its qualifiers (const, volatile, restrict), as in
103 /// the QualType class. The upper bits, after being shifted and
104 /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
105 /// TYPE_OFFSET block to determine the offset of that type's
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000106 /// corresponding record within the DECLTYPES_BLOCK_ID block.
Douglas Gregor8038d512009-04-10 17:25:41 +0000107 TYPE_OFFSET = 1,
Mike Stump1eb44332009-09-09 15:08:12 +0000108
Douglas Gregor8038d512009-04-10 17:25:41 +0000109 /// \brief Record code for the offsets of each decl.
110 ///
111 /// The DECL_OFFSET constant describes the record that occurs
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000112 /// within the block identified by DECL_OFFSETS_BLOCK_ID within
113 /// the PCH block. The record itself is an array of offsets that
114 /// point into the declarations and types block (identified by
115 /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
Douglas Gregor8038d512009-04-10 17:25:41 +0000116 /// record, after subtracting one to account for the use of
117 /// declaration ID 0 for a NULL declaration pointer. Index 0 is
118 /// reserved for the translation unit declaration.
Douglas Gregor0a0428e2009-04-10 20:39:37 +0000119 DECL_OFFSET = 2,
120
121 /// \brief Record code for the language options table.
122 ///
123 /// The record with this code contains the contents of the
124 /// LangOptions structure. We serialize the entire contents of
125 /// the structure, and let the reader decide which options are
126 /// actually important to check.
Douglas Gregor2bec0412009-04-10 21:16:55 +0000127 LANGUAGE_OPTIONS = 3,
128
Douglas Gregorab41e632009-04-27 22:23:34 +0000129 /// \brief PCH metadata, including the PCH file version number
130 /// and the target triple used to build the PCH file.
131 METADATA = 4,
Douglas Gregorafaf3082009-04-11 00:14:32 +0000132
133 /// \brief Record code for the table of offsets of each
134 /// identifier ID.
135 ///
136 /// The offset table contains offsets into the blob stored in
137 /// the IDENTIFIER_TABLE record. Each offset points to the
138 /// NULL-terminated string that corresponds to that identifier.
139 IDENTIFIER_OFFSET = 5,
140
141 /// \brief Record code for the identifier table.
142 ///
143 /// The identifier table is a simple blob that contains
144 /// NULL-terminated strings for all of the identifiers
145 /// referenced by the PCH file. The IDENTIFIER_OFFSET table
146 /// contains the mapping from identifier IDs to the characters
147 /// in this blob. Note that the starting offsets of all of the
148 /// identifiers are odd, so that, when the identifier offset
149 /// table is loaded in, we can use the low bit to distinguish
150 /// between offsets (for unresolved identifier IDs) and
151 /// IdentifierInfo pointers (for already-resolved identifier
152 /// IDs).
Douglas Gregorfdd01722009-04-14 00:24:19 +0000153 IDENTIFIER_TABLE = 6,
154
155 /// \brief Record code for the array of external definitions.
156 ///
Douglas Gregor4c0e86b2009-04-22 22:02:47 +0000157 /// The PCH file contains a list of all of the unnamed external
Douglas Gregorfdd01722009-04-14 00:24:19 +0000158 /// definitions present within the parsed headers, stored as an
159 /// array of declaration IDs. These external definitions will be
160 /// reported to the AST consumer after the PCH file has been
161 /// read, since their presence can affect the semantics of the
162 /// program (e.g., for code generation).
Douglas Gregor3e1af842009-04-17 22:13:46 +0000163 EXTERNAL_DEFINITIONS = 7,
164
Douglas Gregorad1de002009-04-18 05:55:16 +0000165 /// \brief Record code for the set of non-builtin, special
166 /// types.
167 ///
168 /// This record contains the type IDs for the various type nodes
169 /// that are constructed during semantic analysis (e.g.,
170 /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
171 /// offsets into this record.
172 SPECIAL_TYPES = 8,
173
Douglas Gregor4c0e86b2009-04-22 22:02:47 +0000174 /// \brief Record code for the extra statistics we gather while
175 /// generating a PCH file.
176 STATISTICS = 9,
177
178 /// \brief Record code for the array of tentative definitions.
Douglas Gregor14c22f22009-04-22 22:18:58 +0000179 TENTATIVE_DEFINITIONS = 10,
180
181 /// \brief Record code for the array of locally-scoped external
182 /// declarations.
Steve Naroff90cd1bb2009-04-23 10:39:46 +0000183 LOCALLY_SCOPED_EXTERNAL_DECLS = 11,
Mike Stump1eb44332009-09-09 15:08:12 +0000184
Douglas Gregor83941df2009-04-25 17:48:32 +0000185 /// \brief Record code for the table of offsets into the
186 /// Objective-C method pool.
187 SELECTOR_OFFSETS = 12,
Douglas Gregorf0aaf7a2009-04-24 21:10:55 +0000188
189 /// \brief Record code for the Objective-C method pool,
Douglas Gregor2eafc1b2009-04-26 00:07:37 +0000190 METHOD_POOL = 13,
191
192 /// \brief The value of the next __COUNTER__ to dispense.
193 /// [PP_COUNTER_VALUE, Val]
Douglas Gregor7f94b0b2009-04-27 06:38:32 +0000194 PP_COUNTER_VALUE = 14,
195
196 /// \brief Record code for the table of offsets into the block
197 /// of source-location information.
198 SOURCE_LOCATION_OFFSETS = 15,
199
200 /// \brief Record code for the set of source location entries
201 /// that need to be preloaded by the PCH reader.
202 ///
203 /// This set contains the source location entry for the
204 /// predefines buffer and for any file entries that need to be
205 /// preloaded.
Douglas Gregor4fed3f42009-04-27 18:38:38 +0000206 SOURCE_LOCATION_PRELOADS = 16,
207
208 /// \brief Record code for the stat() cache.
Douglas Gregorb81c1702009-04-27 20:06:05 +0000209 STAT_CACHE = 17,
210
211 /// \brief Record code for the set of ext_vector type names.
212 EXT_VECTOR_DECLS = 18,
213
Douglas Gregorb64c1932009-05-12 01:31:05 +0000214 /// \brief Record code for the original file that was used to
215 /// generate the precompiled header.
Argyrios Kyrtzidis1cb35dd2009-07-21 00:06:20 +0000216 ORIGINAL_FILE_NAME = 19,
Mike Stump1eb44332009-09-09 15:08:12 +0000217
Douglas Gregorc6fbbed2010-03-19 22:13:20 +0000218 /// Record #20 intentionally left blank.
Douglas Gregor445e23e2009-10-05 21:07:28 +0000219
Ted Kremenek5b4ec632010-01-22 20:59:36 +0000220 /// \brief Record code for the version control branch and revision
221 /// information of the compiler used to build this PCH file.
Tanya Lattnere6bbc012010-02-12 00:07:30 +0000222 VERSION_CONTROL_BRANCH_REVISION = 21,
223
224 /// \brief Record code for the array of unused static functions.
Douglas Gregor6a5a23f2010-03-19 21:51:54 +0000225 UNUSED_STATIC_FUNCS = 22,
Tanya Lattnere6bbc012010-02-12 00:07:30 +0000226
Douglas Gregor6a5a23f2010-03-19 21:51:54 +0000227 /// \brief Record code for the table of offsets to macro definition
228 /// entries in the preprocessing record.
Argyrios Kyrtzidisd455add2010-07-06 15:37:04 +0000229 MACRO_DEFINITION_OFFSETS = 23,
230
231 /// \brief Record code for the array of VTable uses.
232 VTABLE_USES = 24,
233
234 /// \brief Record code for the array of dynamic classes.
Sebastian Redla93e3b52010-07-08 22:01:51 +0000235 DYNAMIC_CLASSES = 25,
236
237 /// \brief Record code for the chained PCH metadata, including the
238 /// PCH version and the name of the PCH this is chained to.
Fariborz Jahanian32019832010-07-23 19:11:11 +0000239 CHAINED_METADATA = 26,
Sebastian Redld692af72010-07-27 18:24:41 +0000240
Sebastian Redl681d7232010-07-27 00:17:23 +0000241 /// \brief Record code for referenced selector pool.
Sebastian Redld692af72010-07-27 18:24:41 +0000242 REFERENCED_SELECTOR_POOL = 27,
243
244 /// \brief Record code for an update to the TU's lexically contained
245 /// declarations.
Argyrios Kyrtzidis76c38d32010-08-02 07:14:54 +0000246 TU_UPDATE_LEXICAL = 28,
247
248 /// \brief Record code for declarations that Sema keeps references of.
249 SEMA_DECL_REFS = 29
Douglas Gregor2cf26342009-04-09 22:27:44 +0000250 };
251
Douglas Gregor14f79002009-04-10 03:52:48 +0000252 /// \brief Record types used within a source manager block.
253 enum SourceManagerRecordTypes {
254 /// \brief Describes a source location entry (SLocEntry) for a
255 /// file.
256 SM_SLOC_FILE_ENTRY = 1,
257 /// \brief Describes a source location entry (SLocEntry) for a
258 /// buffer.
259 SM_SLOC_BUFFER_ENTRY = 2,
260 /// \brief Describes a blob that contains the data for a buffer
261 /// entry. This kind of record always directly follows a
262 /// SM_SLOC_BUFFER_ENTRY record.
263 SM_SLOC_BUFFER_BLOB = 3,
264 /// \brief Describes a source location entry (SLocEntry) for a
265 /// macro instantiation.
Douglas Gregorbd945002009-04-13 16:31:14 +0000266 SM_SLOC_INSTANTIATION_ENTRY = 4,
267 /// \brief Describes the SourceManager's line table, with
268 /// information about #line directives.
Douglas Gregor12fab312010-03-16 16:35:32 +0000269 SM_LINE_TABLE = 5
Douglas Gregor14f79002009-04-10 03:52:48 +0000270 };
Mike Stump1eb44332009-09-09 15:08:12 +0000271
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000272 /// \brief Record types used within a preprocessor block.
273 enum PreprocessorRecordTypes {
274 // The macros in the PP section are a PP_MACRO_* instance followed by a
275 // list of PP_TOKEN instances for each token in the definition.
276
277 /// \brief An object-like macro definition.
278 /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
279 PP_MACRO_OBJECT_LIKE = 1,
280
281 /// \brief A function-like macro definition.
282 /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
283 /// NumArgs, ArgIdentInfoID* ]
284 PP_MACRO_FUNCTION_LIKE = 2,
Mike Stump1eb44332009-09-09 15:08:12 +0000285
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000286 /// \brief Describes one token.
Chris Lattnerc1f9d822009-04-13 01:29:17 +0000287 /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
Douglas Gregor6a5a23f2010-03-19 21:51:54 +0000288 PP_TOKEN = 3,
289
290 /// \brief Describes a macro instantiation within the preprocessing
291 /// record.
292 PP_MACRO_INSTANTIATION = 4,
293
294 /// \brief Describes a macro definition within the preprocessing record.
295 PP_MACRO_DEFINITION = 5
Chris Lattner7c5d24e2009-04-10 18:00:12 +0000296 };
Douglas Gregor14f79002009-04-10 03:52:48 +0000297
298 /// \defgroup PCHAST Precompiled header AST constants
299 ///
300 /// The constants in this group describe various components of the
301 /// abstract syntax tree within a precompiled header.
302 ///
303 /// @{
304
Douglas Gregor2cf26342009-04-09 22:27:44 +0000305 /// \brief Predefined type IDs.
306 ///
307 /// These type IDs correspond to predefined types in the AST
308 /// context, such as built-in types (int) and special place-holder
309 /// types (the <overload> and <dependent> type markers). Such
310 /// types are never actually serialized, since they will be built
311 /// by the AST context when it is created.
312 enum PredefinedTypeIDs {
313 /// \brief The NULL type.
314 PREDEF_TYPE_NULL_ID = 0,
315 /// \brief The void type.
316 PREDEF_TYPE_VOID_ID = 1,
317 /// \brief The 'bool' or '_Bool' type.
318 PREDEF_TYPE_BOOL_ID = 2,
319 /// \brief The 'char' type, when it is unsigned.
320 PREDEF_TYPE_CHAR_U_ID = 3,
321 /// \brief The 'unsigned char' type.
322 PREDEF_TYPE_UCHAR_ID = 4,
323 /// \brief The 'unsigned short' type.
324 PREDEF_TYPE_USHORT_ID = 5,
325 /// \brief The 'unsigned int' type.
326 PREDEF_TYPE_UINT_ID = 6,
327 /// \brief The 'unsigned long' type.
328 PREDEF_TYPE_ULONG_ID = 7,
329 /// \brief The 'unsigned long long' type.
330 PREDEF_TYPE_ULONGLONG_ID = 8,
331 /// \brief The 'char' type, when it is signed.
332 PREDEF_TYPE_CHAR_S_ID = 9,
333 /// \brief The 'signed char' type.
334 PREDEF_TYPE_SCHAR_ID = 10,
335 /// \brief The C++ 'wchar_t' type.
336 PREDEF_TYPE_WCHAR_ID = 11,
337 /// \brief The (signed) 'short' type.
338 PREDEF_TYPE_SHORT_ID = 12,
339 /// \brief The (signed) 'int' type.
340 PREDEF_TYPE_INT_ID = 13,
341 /// \brief The (signed) 'long' type.
342 PREDEF_TYPE_LONG_ID = 14,
343 /// \brief The (signed) 'long long' type.
344 PREDEF_TYPE_LONGLONG_ID = 15,
345 /// \brief The 'float' type.
346 PREDEF_TYPE_FLOAT_ID = 16,
347 /// \brief The 'double' type.
348 PREDEF_TYPE_DOUBLE_ID = 17,
349 /// \brief The 'long double' type.
350 PREDEF_TYPE_LONGDOUBLE_ID = 18,
351 /// \brief The placeholder type for overloaded function sets.
352 PREDEF_TYPE_OVERLOAD_ID = 19,
353 /// \brief The placeholder type for dependent types.
Chris Lattner2df9ced2009-04-30 02:43:43 +0000354 PREDEF_TYPE_DEPENDENT_ID = 20,
355 /// \brief The '__uint128_t' type.
356 PREDEF_TYPE_UINT128_ID = 21,
357 /// \brief The '__int128_t' type.
Sebastian Redl6e8ed162009-05-10 18:38:11 +0000358 PREDEF_TYPE_INT128_ID = 22,
359 /// \brief The type of 'nullptr'.
Alisdair Meredithf5c209d2009-07-14 06:30:34 +0000360 PREDEF_TYPE_NULLPTR_ID = 23,
361 /// \brief The C++ 'char16_t' type.
362 PREDEF_TYPE_CHAR16_ID = 24,
363 /// \brief The C++ 'char32_t' type.
Steve Naroffde2e22d2009-07-15 18:40:39 +0000364 PREDEF_TYPE_CHAR32_ID = 25,
365 /// \brief The ObjC 'id' type.
366 PREDEF_TYPE_OBJC_ID = 26,
367 /// \brief The ObjC 'Class' type.
Fariborz Jahanian13dcd002009-11-21 19:53:08 +0000368 PREDEF_TYPE_OBJC_CLASS = 27,
369 /// \brief The ObjC 'SEL' type.
370 PREDEF_TYPE_OBJC_SEL = 28
Douglas Gregor2cf26342009-04-09 22:27:44 +0000371 };
372
373 /// \brief The number of predefined type IDs that are reserved for
374 /// the PREDEF_TYPE_* constants.
375 ///
376 /// Type IDs for non-predefined types will start at
377 /// NUM_PREDEF_TYPE_IDs.
378 const unsigned NUM_PREDEF_TYPE_IDS = 100;
379
380 /// \brief Record codes for each kind of type.
381 ///
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000382 /// These constants describe the type records that can occur within a
383 /// block identified by DECLTYPES_BLOCK_ID in the PCH file. Each
Douglas Gregor2cf26342009-04-09 22:27:44 +0000384 /// constant describes a record for a specific type class in the
385 /// AST.
386 enum TypeCode {
387 /// \brief An ExtQualType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000388 TYPE_EXT_QUAL = 1,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000389 /// \brief A ComplexType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000390 TYPE_COMPLEX = 3,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000391 /// \brief A PointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000392 TYPE_POINTER = 4,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000393 /// \brief A BlockPointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000394 TYPE_BLOCK_POINTER = 5,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000395 /// \brief An LValueReferenceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000396 TYPE_LVALUE_REFERENCE = 6,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000397 /// \brief An RValueReferenceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000398 TYPE_RVALUE_REFERENCE = 7,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000399 /// \brief A MemberPointerType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000400 TYPE_MEMBER_POINTER = 8,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000401 /// \brief A ConstantArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000402 TYPE_CONSTANT_ARRAY = 9,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000403 /// \brief An IncompleteArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000404 TYPE_INCOMPLETE_ARRAY = 10,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000405 /// \brief A VariableArrayType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000406 TYPE_VARIABLE_ARRAY = 11,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000407 /// \brief A VectorType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000408 TYPE_VECTOR = 12,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000409 /// \brief An ExtVectorType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000410 TYPE_EXT_VECTOR = 13,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000411 /// \brief A FunctionNoProtoType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000412 TYPE_FUNCTION_NO_PROTO = 14,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000413 /// \brief A FunctionProtoType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000414 TYPE_FUNCTION_PROTO = 15,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000415 /// \brief A TypedefType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000416 TYPE_TYPEDEF = 16,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000417 /// \brief A TypeOfExprType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000418 TYPE_TYPEOF_EXPR = 17,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000419 /// \brief A TypeOfType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000420 TYPE_TYPEOF = 18,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000421 /// \brief A RecordType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000422 TYPE_RECORD = 19,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000423 /// \brief An EnumType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000424 TYPE_ENUM = 20,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000425 /// \brief An ObjCInterfaceType record.
Douglas Gregor63f5c262009-04-16 02:45:14 +0000426 TYPE_OBJC_INTERFACE = 21,
Steve Naroffd1b3c2d2009-06-17 22:40:22 +0000427 /// \brief An ObjCObjectPointerType record.
Steve Naroffc15cb2a2009-07-18 15:33:26 +0000428 TYPE_OBJC_OBJECT_POINTER = 22,
Anders Carlsson395b4752009-06-24 19:06:50 +0000429 /// \brief a DecltypeType record.
John McCall54e14c42009-10-22 22:37:11 +0000430 TYPE_DECLTYPE = 23,
John McCall7da24312009-09-05 00:15:47 +0000431 /// \brief An ElaboratedType record.
John McCall54e14c42009-10-22 22:37:11 +0000432 TYPE_ELABORATED = 24,
John McCall49a832b2009-10-18 09:09:24 +0000433 /// \brief A SubstTemplateTypeParmType record.
John McCalled976492009-12-04 22:46:56 +0000434 TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
435 /// \brief An UnresolvedUsingType record.
John McCall3cb0ebd2010-03-10 03:28:59 +0000436 TYPE_UNRESOLVED_USING = 26,
437 /// \brief An InjectedClassNameType record.
John McCallc12c5bb2010-05-15 11:32:37 +0000438 TYPE_INJECTED_CLASS_NAME = 27,
439 /// \brief An ObjCObjectType record.
Argyrios Kyrtzidis90b715e2010-06-19 19:28:53 +0000440 TYPE_OBJC_OBJECT = 28,
441 /// \brief An TemplateTypeParmType record.
442 TYPE_TEMPLATE_TYPE_PARM = 29,
443 /// \brief An TemplateSpecializationType record.
Argyrios Kyrtzidis8dfbd8b2010-06-24 08:57:31 +0000444 TYPE_TEMPLATE_SPECIALIZATION = 30,
Argyrios Kyrtzidis3acad622010-06-25 16:24:58 +0000445 /// \brief A DependentNameType record.
446 TYPE_DEPENDENT_NAME = 31,
447 /// \brief A DependentTemplateSpecializationType record.
Argyrios Kyrtzidisae8b17f2010-06-30 08:49:25 +0000448 TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
449 /// \brief A DependentSizedArrayType record.
450 TYPE_DEPENDENT_SIZED_ARRAY = 33
Douglas Gregor2cf26342009-04-09 22:27:44 +0000451 };
452
Douglas Gregorad1de002009-04-18 05:55:16 +0000453 /// \brief The type IDs for special types constructed by semantic
454 /// analysis.
455 ///
456 /// The constants in this enumeration are indices into the
457 /// SPECIAL_TYPES record.
458 enum SpecialTypeIDs {
459 /// \brief __builtin_va_list
Douglas Gregor319ac892009-04-23 22:29:11 +0000460 SPECIAL_TYPE_BUILTIN_VA_LIST = 0,
461 /// \brief Objective-C "id" type
462 SPECIAL_TYPE_OBJC_ID = 1,
463 /// \brief Objective-C selector type
464 SPECIAL_TYPE_OBJC_SELECTOR = 2,
465 /// \brief Objective-C Protocol type
466 SPECIAL_TYPE_OBJC_PROTOCOL = 3,
467 /// \brief Objective-C Class type
468 SPECIAL_TYPE_OBJC_CLASS = 4,
469 /// \brief CFConstantString type
470 SPECIAL_TYPE_CF_CONSTANT_STRING = 5,
471 /// \brief Objective-C fast enumeration state type
Douglas Gregorc29f77b2009-07-07 16:35:42 +0000472 SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE = 6,
473 /// \brief C FILE typedef type
Mike Stump782fa302009-07-28 02:25:19 +0000474 SPECIAL_TYPE_FILE = 7,
475 /// \brief C jmp_buf typedef type
476 SPECIAL_TYPE_jmp_buf = 8,
477 /// \brief C sigjmp_buf typedef type
Douglas Gregord1571ac2009-08-21 00:27:50 +0000478 SPECIAL_TYPE_sigjmp_buf = 9,
479 /// \brief Objective-C "id" redefinition type
480 SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10,
481 /// \brief Objective-C "Class" redefinition type
Mike Stumpadaaad32009-10-20 02:12:22 +0000482 SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11,
483 /// \brief Block descriptor type for Blocks CodeGen
Mike Stump083c25e2009-10-22 00:49:09 +0000484 SPECIAL_TYPE_BLOCK_DESCRIPTOR = 12,
485 /// \brief Block extedned descriptor type for Blocks CodeGen
Fariborz Jahanian13dcd002009-11-21 19:53:08 +0000486 SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR = 13,
487 /// \brief Objective-C "SEL" redefinition type
Fariborz Jahanian2bb5dda2010-04-23 17:41:07 +0000488 SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 14,
489 /// \brief NSConstantString type
Argyrios Kyrtzidis00611382010-07-04 21:44:19 +0000490 SPECIAL_TYPE_NS_CONSTANT_STRING = 15,
491 /// \brief Whether __[u]int128_t identifier is installed.
492 SPECIAL_TYPE_INT128_INSTALLED = 16
Douglas Gregorad1de002009-04-18 05:55:16 +0000493 };
494
Douglas Gregor2cf26342009-04-09 22:27:44 +0000495 /// \brief Record codes for each kind of declaration.
496 ///
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000497 /// These constants describe the declaration records that can occur within
498 /// a declarations block (identified by DECLS_BLOCK_ID). Each
Douglas Gregor2cf26342009-04-09 22:27:44 +0000499 /// constant describes a record for a specific declaration class
500 /// in the AST.
501 enum DeclCode {
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000502 /// \brief Attributes attached to a declaration.
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000503 DECL_ATTR = 50,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000504 /// \brief A TranslationUnitDecl record.
Douglas Gregor68a2eb02009-04-15 21:30:51 +0000505 DECL_TRANSLATION_UNIT,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000506 /// \brief A TypedefDecl record.
507 DECL_TYPEDEF,
Douglas Gregor0a2b45e2009-04-13 18:14:40 +0000508 /// \brief An EnumDecl record.
509 DECL_ENUM,
Douglas Gregor8c700062009-04-13 21:20:57 +0000510 /// \brief A RecordDecl record.
511 DECL_RECORD,
Douglas Gregor0a2b45e2009-04-13 18:14:40 +0000512 /// \brief An EnumConstantDecl record.
513 DECL_ENUM_CONSTANT,
Douglas Gregor3a2f7e42009-04-13 22:18:37 +0000514 /// \brief A FunctionDecl record.
515 DECL_FUNCTION,
Steve Naroff53c9d8a2009-04-20 15:06:07 +0000516 /// \brief A ObjCMethodDecl record.
517 DECL_OBJC_METHOD,
Steve Naroff33feeb02009-04-20 20:09:33 +0000518 /// \brief A ObjCInterfaceDecl record.
Steve Naroff30833f82009-04-21 15:12:33 +0000519 DECL_OBJC_INTERFACE,
520 /// \brief A ObjCProtocolDecl record.
521 DECL_OBJC_PROTOCOL,
Steve Naroff33feeb02009-04-20 20:09:33 +0000522 /// \brief A ObjCIvarDecl record.
Steve Naroff30833f82009-04-21 15:12:33 +0000523 DECL_OBJC_IVAR,
524 /// \brief A ObjCAtDefsFieldDecl record.
525 DECL_OBJC_AT_DEFS_FIELD,
526 /// \brief A ObjCClassDecl record.
527 DECL_OBJC_CLASS,
528 /// \brief A ObjCForwardProtocolDecl record.
529 DECL_OBJC_FORWARD_PROTOCOL,
530 /// \brief A ObjCCategoryDecl record.
531 DECL_OBJC_CATEGORY,
532 /// \brief A ObjCCategoryImplDecl record.
533 DECL_OBJC_CATEGORY_IMPL,
534 /// \brief A ObjCImplementationDecl record.
535 DECL_OBJC_IMPLEMENTATION,
536 /// \brief A ObjCCompatibleAliasDecl record.
537 DECL_OBJC_COMPATIBLE_ALIAS,
538 /// \brief A ObjCPropertyDecl record.
539 DECL_OBJC_PROPERTY,
540 /// \brief A ObjCPropertyImplDecl record.
541 DECL_OBJC_PROPERTY_IMPL,
Douglas Gregor8c700062009-04-13 21:20:57 +0000542 /// \brief A FieldDecl record.
543 DECL_FIELD,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000544 /// \brief A VarDecl record.
545 DECL_VAR,
Douglas Gregor405bad02009-04-26 22:20:50 +0000546 /// \brief An ImplicitParamDecl record.
547 DECL_IMPLICIT_PARAM,
Douglas Gregor3a2f7e42009-04-13 22:18:37 +0000548 /// \brief A ParmVarDecl record.
549 DECL_PARM_VAR,
Douglas Gregor1028bc62009-04-13 22:49:25 +0000550 /// \brief A FileScopeAsmDecl record.
551 DECL_FILE_SCOPE_ASM,
552 /// \brief A BlockDecl record.
553 DECL_BLOCK,
Douglas Gregor2cf26342009-04-09 22:27:44 +0000554 /// \brief A record that stores the set of declarations that are
555 /// lexically stored within a given DeclContext.
556 ///
Sebastian Redl681d7232010-07-27 00:17:23 +0000557 /// The record itself is a blob that is an array of declaration IDs,
558 /// in the order in which those declarations were added to the
Douglas Gregor2cf26342009-04-09 22:27:44 +0000559 /// declaration context. This data is used when iterating over
560 /// the contents of a DeclContext, e.g., via
561 /// DeclContext::decls_begin()/DeclContext::decls_end().
562 DECL_CONTEXT_LEXICAL,
563 /// \brief A record that stores the set of declarations that are
564 /// visible from a given DeclContext.
565 ///
566 /// The record itself stores a set of mappings, each of which
567 /// associates a declaration name with one or more declaration
568 /// IDs. This data is used when performing qualified name lookup
569 /// into a DeclContext via DeclContext::lookup.
Douglas Gregor0cef4832010-02-21 18:22:14 +0000570 DECL_CONTEXT_VISIBLE,
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000571 /// \brief A NamespaceDecl rcord.
572 DECL_NAMESPACE,
573 /// \brief A NamespaceAliasDecl record.
574 DECL_NAMESPACE_ALIAS,
575 /// \brief A UsingDecl record.
576 DECL_USING,
577 /// \brief A UsingShadowDecl record.
578 DECL_USING_SHADOW,
579 /// \brief A UsingDirecitveDecl record.
580 DECL_USING_DIRECTIVE,
581 /// \brief An UnresolvedUsingValueDecl record.
582 DECL_UNRESOLVED_USING_VALUE,
583 /// \brief An UnresolvedUsingTypenameDecl record.
584 DECL_UNRESOLVED_USING_TYPENAME,
585 /// \brief A LinkageSpecDecl record.
586 DECL_LINKAGE_SPEC,
587 /// \brief A CXXRecordDecl record.
588 DECL_CXX_RECORD,
589 /// \brief A CXXMethodDecl record.
590 DECL_CXX_METHOD,
591 /// \brief A CXXConstructorDecl record.
592 DECL_CXX_CONSTRUCTOR,
593 /// \brief A CXXDestructorDecl record.
594 DECL_CXX_DESTRUCTOR,
595 /// \brief A CXXConversionDecl record.
596 DECL_CXX_CONVERSION,
Abramo Bagnara6206d532010-06-05 05:09:32 +0000597 /// \brief An AccessSpecDecl record.
598 DECL_ACCESS_SPEC,
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000599
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000600 /// \brief A FriendDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000601 DECL_FRIEND,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000602 /// \brief A FriendTemplateDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000603 DECL_FRIEND_TEMPLATE,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000604 /// \brief A ClassTemplateDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000605 DECL_CLASS_TEMPLATE,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000606 /// \brief A ClassTemplateSpecializationDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000607 DECL_CLASS_TEMPLATE_SPECIALIZATION,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000608 /// \brief A ClassTemplatePartialSpecializationDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000609 DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000610 /// \brief A FunctionTemplateDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000611 DECL_FUNCTION_TEMPLATE,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000612 /// \brief A TemplateTypeParmDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000613 DECL_TEMPLATE_TYPE_PARM,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000614 /// \brief A NonTypeTemplateParmDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000615 DECL_NON_TYPE_TEMPLATE_PARM,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000616 /// \brief A TemplateTemplateParmDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000617 DECL_TEMPLATE_TEMPLATE_PARM,
Argyrios Kyrtzidis5f3dbf52010-07-22 17:28:27 +0000618 /// \brief A StaticAssertDecl record.
Chris Lattner6ad9ac02010-05-07 21:43:38 +0000619 DECL_STATIC_ASSERT
Douglas Gregor2cf26342009-04-09 22:27:44 +0000620 };
Douglas Gregor0b748912009-04-14 21:18:50 +0000621
622 /// \brief Record codes for each kind of statement or expression.
623 ///
624 /// These constants describe the records that describe statements
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000625 /// or expressions. These records occur within type and declarations
626 /// block, so they begin with record values of 100. Each constant
627 /// describes a record for a specific statement or expression class in the
628 /// AST.
Douglas Gregor0b748912009-04-14 21:18:50 +0000629 enum StmtCode {
Douglas Gregor087fd532009-04-14 23:32:43 +0000630 /// \brief A marker record that indicates that we are at the end
631 /// of an expression.
Douglas Gregor61d60ee2009-10-17 00:13:19 +0000632 STMT_STOP = 100,
Douglas Gregor0b748912009-04-14 21:18:50 +0000633 /// \brief A NULL expression.
Douglas Gregorc9490c02009-04-16 22:23:12 +0000634 STMT_NULL_PTR,
Douglas Gregor025452f2009-04-17 00:04:06 +0000635 /// \brief A NullStmt record.
636 STMT_NULL,
637 /// \brief A CompoundStmt record.
638 STMT_COMPOUND,
639 /// \brief A CaseStmt record.
640 STMT_CASE,
641 /// \brief A DefaultStmt record.
642 STMT_DEFAULT,
Douglas Gregor1de05fe2009-04-17 18:18:49 +0000643 /// \brief A LabelStmt record.
644 STMT_LABEL,
Douglas Gregor025452f2009-04-17 00:04:06 +0000645 /// \brief An IfStmt record.
646 STMT_IF,
647 /// \brief A SwitchStmt record.
648 STMT_SWITCH,
Douglas Gregord921cf92009-04-17 00:16:09 +0000649 /// \brief A WhileStmt record.
650 STMT_WHILE,
Douglas Gregor67d82492009-04-17 00:29:51 +0000651 /// \brief A DoStmt record.
652 STMT_DO,
653 /// \brief A ForStmt record.
654 STMT_FOR,
Douglas Gregor1de05fe2009-04-17 18:18:49 +0000655 /// \brief A GotoStmt record.
656 STMT_GOTO,
Douglas Gregor7d5c2f22009-04-17 18:58:21 +0000657 /// \brief An IndirectGotoStmt record.
658 STMT_INDIRECT_GOTO,
Douglas Gregord921cf92009-04-17 00:16:09 +0000659 /// \brief A ContinueStmt record.
660 STMT_CONTINUE,
Douglas Gregor025452f2009-04-17 00:04:06 +0000661 /// \brief A BreakStmt record.
662 STMT_BREAK,
Douglas Gregor0de9d882009-04-17 16:34:57 +0000663 /// \brief A ReturnStmt record.
664 STMT_RETURN,
Douglas Gregor84f21702009-04-17 16:55:36 +0000665 /// \brief A DeclStmt record.
666 STMT_DECL,
Douglas Gregorcd7d5a92009-04-17 20:57:14 +0000667 /// \brief An AsmStmt record.
668 STMT_ASM,
Douglas Gregor17fc2232009-04-14 21:55:33 +0000669 /// \brief A PredefinedExpr record.
670 EXPR_PREDEFINED,
Douglas Gregor0b748912009-04-14 21:18:50 +0000671 /// \brief A DeclRefExpr record.
672 EXPR_DECL_REF,
673 /// \brief An IntegerLiteral record.
674 EXPR_INTEGER_LITERAL,
Douglas Gregor17fc2232009-04-14 21:55:33 +0000675 /// \brief A FloatingLiteral record.
676 EXPR_FLOATING_LITERAL,
Douglas Gregorcb2ca732009-04-15 22:19:53 +0000677 /// \brief An ImaginaryLiteral record.
678 EXPR_IMAGINARY_LITERAL,
Douglas Gregor673ecd62009-04-15 16:35:07 +0000679 /// \brief A StringLiteral record.
680 EXPR_STRING_LITERAL,
Douglas Gregor0b748912009-04-14 21:18:50 +0000681 /// \brief A CharacterLiteral record.
Douglas Gregor087fd532009-04-14 23:32:43 +0000682 EXPR_CHARACTER_LITERAL,
Douglas Gregorc04db4f2009-04-14 23:59:37 +0000683 /// \brief A ParenExpr record.
684 EXPR_PAREN,
Argyrios Kyrtzidis37bdfe22010-06-30 08:49:18 +0000685 /// \brief A ParenListExpr record.
686 EXPR_PAREN_LIST,
Douglas Gregor0b0b77f2009-04-15 15:58:59 +0000687 /// \brief A UnaryOperator record.
688 EXPR_UNARY_OPERATOR,
Douglas Gregor8ecdb652010-04-28 22:16:22 +0000689 /// \brief An OffsetOfExpr record.
690 EXPR_OFFSETOF,
Douglas Gregor0b0b77f2009-04-15 15:58:59 +0000691 /// \brief A SizefAlignOfExpr record.
692 EXPR_SIZEOF_ALIGN_OF,
Douglas Gregorcb2ca732009-04-15 22:19:53 +0000693 /// \brief An ArraySubscriptExpr record.
694 EXPR_ARRAY_SUBSCRIPT,
Douglas Gregor1f0d0132009-04-15 17:43:59 +0000695 /// \brief A CallExpr record.
696 EXPR_CALL,
697 /// \brief A MemberExpr record.
698 EXPR_MEMBER,
Douglas Gregordb600c32009-04-15 00:25:59 +0000699 /// \brief A BinaryOperator record.
700 EXPR_BINARY_OPERATOR,
Douglas Gregorad90e962009-04-15 22:40:36 +0000701 /// \brief A CompoundAssignOperator record.
702 EXPR_COMPOUND_ASSIGN_OPERATOR,
703 /// \brief A ConditionOperator record.
704 EXPR_CONDITIONAL_OPERATOR,
Douglas Gregor087fd532009-04-14 23:32:43 +0000705 /// \brief An ImplicitCastExpr record.
Douglas Gregordb600c32009-04-15 00:25:59 +0000706 EXPR_IMPLICIT_CAST,
707 /// \brief A CStyleCastExpr record.
Douglas Gregord3c98a02009-04-15 23:02:49 +0000708 EXPR_CSTYLE_CAST,
Douglas Gregorba6d7e72009-04-16 02:33:48 +0000709 /// \brief A CompoundLiteralExpr record.
710 EXPR_COMPOUND_LITERAL,
Douglas Gregord3c98a02009-04-15 23:02:49 +0000711 /// \brief An ExtVectorElementExpr record.
712 EXPR_EXT_VECTOR_ELEMENT,
Douglas Gregord077d752009-04-16 00:55:48 +0000713 /// \brief An InitListExpr record.
714 EXPR_INIT_LIST,
715 /// \brief A DesignatedInitExpr record.
716 EXPR_DESIGNATED_INIT,
717 /// \brief An ImplicitValueInitExpr record.
718 EXPR_IMPLICIT_VALUE_INIT,
Douglas Gregord3c98a02009-04-15 23:02:49 +0000719 /// \brief A VAArgExpr record.
Douglas Gregor44cae0c2009-04-15 23:33:31 +0000720 EXPR_VA_ARG,
Douglas Gregor6a2dd552009-04-17 19:05:30 +0000721 /// \brief An AddrLabelExpr record.
Douglas Gregor7d5c2f22009-04-17 18:58:21 +0000722 EXPR_ADDR_LABEL,
Douglas Gregor6a2dd552009-04-17 19:05:30 +0000723 /// \brief A StmtExpr record.
724 EXPR_STMT,
Douglas Gregor44cae0c2009-04-15 23:33:31 +0000725 /// \brief A TypesCompatibleExpr record.
726 EXPR_TYPES_COMPATIBLE,
727 /// \brief A ChooseExpr record.
728 EXPR_CHOOSE,
729 /// \brief A GNUNullExpr record.
Douglas Gregor94cd5d12009-04-16 00:01:45 +0000730 EXPR_GNU_NULL,
731 /// \brief A ShuffleVectorExpr record.
732 EXPR_SHUFFLE_VECTOR,
Douglas Gregor84af7c22009-04-17 19:21:43 +0000733 /// \brief BlockExpr
734 EXPR_BLOCK,
735 /// \brief A BlockDeclRef record.
Chris Lattner4dcf151a2009-04-22 05:57:30 +0000736 EXPR_BLOCK_DECL_REF,
Douglas Gregor39da0b82009-09-09 23:08:42 +0000737
Chris Lattner4dcf151a2009-04-22 05:57:30 +0000738 // Objective-C
Mike Stump1eb44332009-09-09 15:08:12 +0000739
Chris Lattner0389e6b2009-04-26 00:44:05 +0000740 /// \brief An ObjCStringLiteral record.
Chris Lattner3a57a372009-04-22 06:29:42 +0000741 EXPR_OBJC_STRING_LITERAL,
Chris Lattner0389e6b2009-04-26 00:44:05 +0000742 /// \brief An ObjCEncodeExpr record.
Chris Lattner3a57a372009-04-22 06:29:42 +0000743 EXPR_OBJC_ENCODE,
Chris Lattner0389e6b2009-04-26 00:44:05 +0000744 /// \brief An ObjCSelectorExpr record.
Chris Lattner3a57a372009-04-22 06:29:42 +0000745 EXPR_OBJC_SELECTOR_EXPR,
Chris Lattner0389e6b2009-04-26 00:44:05 +0000746 /// \brief An ObjCProtocolExpr record.
Steve Naroffc4f0bbd2009-04-25 14:04:28 +0000747 EXPR_OBJC_PROTOCOL_EXPR,
Chris Lattner0389e6b2009-04-26 00:44:05 +0000748 /// \brief An ObjCIvarRefExpr record.
749 EXPR_OBJC_IVAR_REF_EXPR,
750 /// \brief An ObjCPropertyRefExpr record.
751 EXPR_OBJC_PROPERTY_REF_EXPR,
Fariborz Jahanian09105f52009-08-20 17:02:02 +0000752 /// \brief An ObjCImplicitSetterGetterRefExpr record.
Chris Lattner0389e6b2009-04-26 00:44:05 +0000753 EXPR_OBJC_KVC_REF_EXPR,
754 /// \brief An ObjCMessageExpr record.
755 EXPR_OBJC_MESSAGE_EXPR,
756 /// \brief An ObjCSuperExpr record.
Steve Naroff1eb55402009-04-26 18:52:16 +0000757 EXPR_OBJC_SUPER_EXPR,
Steve Narofff242b1b2009-07-24 17:54:45 +0000758 /// \brief An ObjCIsa Expr record.
759 EXPR_OBJC_ISA,
Mike Stump1eb44332009-09-09 15:08:12 +0000760
761 /// \brief An ObjCForCollectionStmt record.
Steve Naroff1eb55402009-04-26 18:52:16 +0000762 STMT_OBJC_FOR_COLLECTION,
Mike Stump1eb44332009-09-09 15:08:12 +0000763 /// \brief An ObjCAtCatchStmt record.
Steve Naroff1eb55402009-04-26 18:52:16 +0000764 STMT_OBJC_CATCH,
Mike Stump1eb44332009-09-09 15:08:12 +0000765 /// \brief An ObjCAtFinallyStmt record.
Steve Naroff1eb55402009-04-26 18:52:16 +0000766 STMT_OBJC_FINALLY,
Mike Stump1eb44332009-09-09 15:08:12 +0000767 /// \brief An ObjCAtTryStmt record.
Steve Naroff1eb55402009-04-26 18:52:16 +0000768 STMT_OBJC_AT_TRY,
Mike Stump1eb44332009-09-09 15:08:12 +0000769 /// \brief An ObjCAtSynchronizedStmt record.
Steve Naroff1eb55402009-04-26 18:52:16 +0000770 STMT_OBJC_AT_SYNCHRONIZED,
Mike Stump1eb44332009-09-09 15:08:12 +0000771 /// \brief An ObjCAtThrowStmt record.
Argyrios Kyrtzidisba0a9002009-07-14 03:19:21 +0000772 STMT_OBJC_AT_THROW,
773
774 // C++
Argyrios Kyrtzidis7cb45e32010-07-22 16:03:56 +0000775
776 /// \brief A CXXCatchStmt record.
777 STMT_CXX_CATCH,
778 /// \brief A CXXTryStmt record.
779 STMT_CXX_TRY,
Argyrios Kyrtzidisba0a9002009-07-14 03:19:21 +0000780
Douglas Gregor39da0b82009-09-09 23:08:42 +0000781 /// \brief A CXXOperatorCallExpr record.
782 EXPR_CXX_OPERATOR_CALL,
Chris Lattner1817bd42010-05-09 05:36:05 +0000783 /// \brief A CXXMemberCallExpr record.
784 EXPR_CXX_MEMBER_CALL,
Douglas Gregor39da0b82009-09-09 23:08:42 +0000785 /// \brief A CXXConstructExpr record.
Sam Weinigce757a72010-01-16 21:21:01 +0000786 EXPR_CXX_CONSTRUCT,
Argyrios Kyrtzidis6d00c132010-07-10 11:46:15 +0000787 /// \brief A CXXTemporaryObjectExpr record.
788 EXPR_CXX_TEMPORARY_OBJECT,
Sam Weinigce757a72010-01-16 21:21:01 +0000789 // \brief A CXXStaticCastExpr record.
790 EXPR_CXX_STATIC_CAST,
791 // \brief A CXXDynamicCastExpr record.
792 EXPR_CXX_DYNAMIC_CAST,
793 // \brief A CXXReinterpretCastExpr record.
794 EXPR_CXX_REINTERPRET_CAST,
795 // \brief A CXXConstCastExpr record.
796 EXPR_CXX_CONST_CAST,
797 // \brief A CXXFunctionalCastExpr record.
Sam Weinigeb7f9612010-02-07 06:32:43 +0000798 EXPR_CXX_FUNCTIONAL_CAST,
799 // \brief A CXXBoolLiteralExpr record.
800 EXPR_CXX_BOOL_LITERAL,
Chris Lattner14ab24f2010-05-09 06:03:39 +0000801 EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr
802 EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr).
Chris Lattner2fbdfcd2010-05-09 06:15:05 +0000803 EXPR_CXX_TYPEID_TYPE, // CXXTypeidExpr (of type).
804 EXPR_CXX_THIS, // CXXThisExpr
Chris Lattner030854b2010-05-09 06:40:08 +0000805 EXPR_CXX_THROW, // CXXThrowExpr
Chris Lattnerd2598362010-05-10 00:25:06 +0000806 EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr
807 EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr
Argyrios Kyrtzidis6d00c132010-07-10 11:46:15 +0000808 EXPR_CXX_BIND_REFERENCE, // CXXBindReferenceExpr
809
Douglas Gregored8abf12010-07-08 06:14:04 +0000810 EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
Chris Lattner59218632010-05-10 01:22:27 +0000811 EXPR_CXX_NEW, // CXXNewExpr
Argyrios Kyrtzidis95fc98c2010-06-22 17:07:59 +0000812 EXPR_CXX_DELETE, // CXXDeleteExpr
Argyrios Kyrtzidisde4bd182010-06-28 09:32:03 +0000813 EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
Chris Lattnerd2598362010-05-10 00:25:06 +0000814
Argyrios Kyrtzidis8dfbd8b2010-06-24 08:57:31 +0000815 EXPR_CXX_EXPR_WITH_TEMPORARIES, // CXXExprWithTemporaries
816
817 EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr
Argyrios Kyrtzidis12dffcd2010-06-28 09:31:56 +0000818 EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
Argyrios Kyrtzidisa77eb082010-06-25 09:03:26 +0000819 EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr
Argyrios Kyrtzidisbd65bb52010-06-25 09:03:34 +0000820 EXPR_CXX_UNRESOLVED_MEMBER, // UnresolvedMemberExpr
Argyrios Kyrtzidis6d00c132010-07-10 11:46:15 +0000821 EXPR_CXX_UNRESOLVED_LOOKUP, // UnresolvedLookupExpr
822
823 EXPR_CXX_UNARY_TYPE_TRAIT // UnaryTypeTraitExpr
Douglas Gregor0b748912009-04-14 21:18:50 +0000824 };
Douglas Gregord077d752009-04-16 00:55:48 +0000825
826 /// \brief The kinds of designators that can occur in a
827 /// DesignatedInitExpr.
828 enum DesignatorTypes {
829 /// \brief Field designator where only the field name is known.
830 DESIG_FIELD_NAME = 0,
831 /// \brief Field designator where the field has been resolved to
832 /// a declaration.
833 DESIG_FIELD_DECL = 1,
834 /// \brief Array designator.
835 DESIG_ARRAY = 2,
836 /// \brief GNU array range designator.
837 DESIG_ARRAY_RANGE = 3
838 };
839
Douglas Gregor14f79002009-04-10 03:52:48 +0000840 /// @}
Douglas Gregor2cf26342009-04-09 22:27:44 +0000841 }
842} // end namespace clang
843
844#endif