Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 1 | //===- 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 | |
| 23 | namespace clang { |
| 24 | namespace pch { |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 25 | /// \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 Gregor | 1bbeec7 | 2009-07-08 21:07:44 +0000 | [diff] [blame] | 32 | const unsigned VERSION_MAJOR = 2; |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 33 | |
| 34 | /// \brief PCH minor version number supported by this version of |
| 35 | /// Clang. |
| 36 | /// |
| 37 | /// Whenever the PCH format changes in a way that is still |
| 38 | /// compatible with previous versions (such that a reader designed |
| 39 | /// for the previous version could still support reading the new |
| 40 | /// version by ignoring new kinds of subblocks), this number |
| 41 | /// should be increased. |
| 42 | const unsigned VERSION_MINOR = 0; |
| 43 | |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 44 | /// \brief An ID number that refers to a declaration in a PCH file. |
| 45 | /// |
| 46 | /// The ID numbers of types are consecutive (in order of |
| 47 | /// discovery) and start at 2. 0 is reserved for NULL, and 1 is |
| 48 | /// reserved for the translation unit declaration. |
| 49 | typedef uint32_t DeclID; |
| 50 | |
| 51 | /// \brief An ID number that refers to a type in a PCH file. |
| 52 | /// |
| 53 | /// The ID of a type is partitioned into two parts: the lower |
| 54 | /// three bits are used to store the const/volatile/restrict |
| 55 | /// qualifiers (as with QualType) and the upper bits provide a |
| 56 | /// type index. The type index values are partitioned into two |
| 57 | /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type |
| 58 | /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a |
| 59 | /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are |
| 60 | /// other types that have serialized representations. |
| 61 | typedef uint32_t TypeID; |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 62 | |
Douglas Gregor | afaf308 | 2009-04-11 00:14:32 +0000 | [diff] [blame] | 63 | /// \brief An ID number that refers to an identifier in a PCH |
| 64 | /// file. |
| 65 | typedef uint32_t IdentID; |
| 66 | |
Steve Naroff | 90cd1bb | 2009-04-23 10:39:46 +0000 | [diff] [blame] | 67 | typedef uint32_t SelectorID; |
| 68 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 69 | /// \brief Describes the various kinds of blocks that occur within |
| 70 | /// a PCH file. |
| 71 | enum BlockIDs { |
| 72 | /// \brief The PCH block, which acts as a container around the |
| 73 | /// full PCH block. |
| 74 | PCH_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID, |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 75 | |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 76 | /// \brief The block containing information about the source |
| 77 | /// manager. |
| 78 | SOURCE_MANAGER_BLOCK_ID, |
| 79 | |
| 80 | /// \brief The block containing information about the |
| 81 | /// preprocessor. |
| 82 | PREPROCESSOR_BLOCK_ID, |
| 83 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 84 | /// \brief The block containing the definitions of all of the |
| 85 | /// types used within the PCH file. |
| 86 | TYPES_BLOCK_ID, |
| 87 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 88 | /// \brief The block containing the definitions of all of the |
| 89 | /// declarations stored in the PCH file. |
Douglas Gregor | 83941df | 2009-04-25 17:48:32 +0000 | [diff] [blame] | 90 | DECLS_BLOCK_ID |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 91 | }; |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 92 | |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 93 | /// \brief Record types that occur within the PCH block itself. |
| 94 | enum PCHRecordTypes { |
| 95 | /// \brief Offset of each type within the types block. |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 96 | /// |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 97 | /// The TYPE_OFFSET constant describes the record that occurs |
| 98 | /// within the block identified by TYPE_OFFSETS_BLOCK_ID within |
| 99 | /// the PCH file. The record itself is an array of offsets that |
| 100 | /// point into the types block (identified by TYPES_BLOCK_ID in |
| 101 | /// the PCH file). The index into the array is based on the ID |
| 102 | /// of a type. For a given type ID @c T, the lower three bits of |
| 103 | /// @c T are its qualifiers (const, volatile, restrict), as in |
| 104 | /// the QualType class. The upper bits, after being shifted and |
| 105 | /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the |
| 106 | /// TYPE_OFFSET block to determine the offset of that type's |
| 107 | /// corresponding record within the TYPES_BLOCK_ID block. |
| 108 | TYPE_OFFSET = 1, |
| 109 | |
| 110 | /// \brief Record code for the offsets of each decl. |
| 111 | /// |
| 112 | /// The DECL_OFFSET constant describes the record that occurs |
| 113 | /// within the block identifier by DECL_OFFSETS_BLOCK_ID within |
| 114 | /// the PCH file. The record itself is an array of offsets that |
| 115 | /// point into the declarations block (identified by |
| 116 | /// DECLS_BLOCK_ID). The declaration ID is an index into this |
| 117 | /// record, after subtracting one to account for the use of |
| 118 | /// declaration ID 0 for a NULL declaration pointer. Index 0 is |
| 119 | /// reserved for the translation unit declaration. |
Douglas Gregor | 0a0428e | 2009-04-10 20:39:37 +0000 | [diff] [blame] | 120 | DECL_OFFSET = 2, |
| 121 | |
| 122 | /// \brief Record code for the language options table. |
| 123 | /// |
| 124 | /// The record with this code contains the contents of the |
| 125 | /// LangOptions structure. We serialize the entire contents of |
| 126 | /// the structure, and let the reader decide which options are |
| 127 | /// actually important to check. |
Douglas Gregor | 2bec041 | 2009-04-10 21:16:55 +0000 | [diff] [blame] | 128 | LANGUAGE_OPTIONS = 3, |
| 129 | |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 130 | /// \brief PCH metadata, including the PCH file version number |
| 131 | /// and the target triple used to build the PCH file. |
| 132 | METADATA = 4, |
Douglas Gregor | afaf308 | 2009-04-11 00:14:32 +0000 | [diff] [blame] | 133 | |
| 134 | /// \brief Record code for the table of offsets of each |
| 135 | /// identifier ID. |
| 136 | /// |
| 137 | /// The offset table contains offsets into the blob stored in |
| 138 | /// the IDENTIFIER_TABLE record. Each offset points to the |
| 139 | /// NULL-terminated string that corresponds to that identifier. |
| 140 | IDENTIFIER_OFFSET = 5, |
| 141 | |
| 142 | /// \brief Record code for the identifier table. |
| 143 | /// |
| 144 | /// The identifier table is a simple blob that contains |
| 145 | /// NULL-terminated strings for all of the identifiers |
| 146 | /// referenced by the PCH file. The IDENTIFIER_OFFSET table |
| 147 | /// contains the mapping from identifier IDs to the characters |
| 148 | /// in this blob. Note that the starting offsets of all of the |
| 149 | /// identifiers are odd, so that, when the identifier offset |
| 150 | /// table is loaded in, we can use the low bit to distinguish |
| 151 | /// between offsets (for unresolved identifier IDs) and |
| 152 | /// IdentifierInfo pointers (for already-resolved identifier |
| 153 | /// IDs). |
Douglas Gregor | fdd0172 | 2009-04-14 00:24:19 +0000 | [diff] [blame] | 154 | IDENTIFIER_TABLE = 6, |
| 155 | |
| 156 | /// \brief Record code for the array of external definitions. |
| 157 | /// |
Douglas Gregor | 4c0e86b | 2009-04-22 22:02:47 +0000 | [diff] [blame] | 158 | /// The PCH file contains a list of all of the unnamed external |
Douglas Gregor | fdd0172 | 2009-04-14 00:24:19 +0000 | [diff] [blame] | 159 | /// definitions present within the parsed headers, stored as an |
| 160 | /// array of declaration IDs. These external definitions will be |
| 161 | /// reported to the AST consumer after the PCH file has been |
| 162 | /// read, since their presence can affect the semantics of the |
| 163 | /// program (e.g., for code generation). |
Douglas Gregor | 3e1af84 | 2009-04-17 22:13:46 +0000 | [diff] [blame] | 164 | EXTERNAL_DEFINITIONS = 7, |
| 165 | |
Douglas Gregor | ad1de00 | 2009-04-18 05:55:16 +0000 | [diff] [blame] | 166 | /// \brief Record code for the set of non-builtin, special |
| 167 | /// types. |
| 168 | /// |
| 169 | /// This record contains the type IDs for the various type nodes |
| 170 | /// that are constructed during semantic analysis (e.g., |
| 171 | /// __builtin_va_list). The SPECIAL_TYPE_* constants provide |
| 172 | /// offsets into this record. |
| 173 | SPECIAL_TYPES = 8, |
| 174 | |
Douglas Gregor | 4c0e86b | 2009-04-22 22:02:47 +0000 | [diff] [blame] | 175 | /// \brief Record code for the extra statistics we gather while |
| 176 | /// generating a PCH file. |
| 177 | STATISTICS = 9, |
| 178 | |
| 179 | /// \brief Record code for the array of tentative definitions. |
Douglas Gregor | 14c22f2 | 2009-04-22 22:18:58 +0000 | [diff] [blame] | 180 | TENTATIVE_DEFINITIONS = 10, |
| 181 | |
| 182 | /// \brief Record code for the array of locally-scoped external |
| 183 | /// declarations. |
Steve Naroff | 90cd1bb | 2009-04-23 10:39:46 +0000 | [diff] [blame] | 184 | LOCALLY_SCOPED_EXTERNAL_DECLS = 11, |
| 185 | |
Douglas Gregor | 83941df | 2009-04-25 17:48:32 +0000 | [diff] [blame] | 186 | /// \brief Record code for the table of offsets into the |
| 187 | /// Objective-C method pool. |
| 188 | SELECTOR_OFFSETS = 12, |
Douglas Gregor | f0aaf7a | 2009-04-24 21:10:55 +0000 | [diff] [blame] | 189 | |
| 190 | /// \brief Record code for the Objective-C method pool, |
Douglas Gregor | 2eafc1b | 2009-04-26 00:07:37 +0000 | [diff] [blame] | 191 | METHOD_POOL = 13, |
| 192 | |
| 193 | /// \brief The value of the next __COUNTER__ to dispense. |
| 194 | /// [PP_COUNTER_VALUE, Val] |
Douglas Gregor | 7f94b0b | 2009-04-27 06:38:32 +0000 | [diff] [blame] | 195 | PP_COUNTER_VALUE = 14, |
| 196 | |
| 197 | /// \brief Record code for the table of offsets into the block |
| 198 | /// of source-location information. |
| 199 | SOURCE_LOCATION_OFFSETS = 15, |
| 200 | |
| 201 | /// \brief Record code for the set of source location entries |
| 202 | /// that need to be preloaded by the PCH reader. |
| 203 | /// |
| 204 | /// This set contains the source location entry for the |
| 205 | /// predefines buffer and for any file entries that need to be |
| 206 | /// preloaded. |
Douglas Gregor | 4fed3f4 | 2009-04-27 18:38:38 +0000 | [diff] [blame] | 207 | SOURCE_LOCATION_PRELOADS = 16, |
| 208 | |
| 209 | /// \brief Record code for the stat() cache. |
Douglas Gregor | b81c170 | 2009-04-27 20:06:05 +0000 | [diff] [blame] | 210 | STAT_CACHE = 17, |
| 211 | |
| 212 | /// \brief Record code for the set of ext_vector type names. |
| 213 | EXT_VECTOR_DECLS = 18, |
| 214 | |
Douglas Gregor | b64c193 | 2009-05-12 01:31:05 +0000 | [diff] [blame] | 215 | /// \brief Record code for the original file that was used to |
| 216 | /// generate the precompiled header. |
Argyrios Kyrtzidis | 1cb35dd | 2009-07-21 00:06:20 +0000 | [diff] [blame] | 217 | ORIGINAL_FILE_NAME = 19, |
Douglas Gregor | 2e22253 | 2009-07-02 17:08:52 +0000 | [diff] [blame] | 218 | |
| 219 | /// \brief Record code for the sorted array of source ranges where |
| 220 | /// comments were encountered in the source code. |
Argyrios Kyrtzidis | 1cb35dd | 2009-07-21 00:06:20 +0000 | [diff] [blame] | 221 | COMMENT_RANGES = 20 |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 222 | }; |
| 223 | |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 224 | /// \brief Record types used within a source manager block. |
| 225 | enum SourceManagerRecordTypes { |
| 226 | /// \brief Describes a source location entry (SLocEntry) for a |
| 227 | /// file. |
| 228 | SM_SLOC_FILE_ENTRY = 1, |
| 229 | /// \brief Describes a source location entry (SLocEntry) for a |
| 230 | /// buffer. |
| 231 | SM_SLOC_BUFFER_ENTRY = 2, |
| 232 | /// \brief Describes a blob that contains the data for a buffer |
| 233 | /// entry. This kind of record always directly follows a |
| 234 | /// SM_SLOC_BUFFER_ENTRY record. |
| 235 | SM_SLOC_BUFFER_BLOB = 3, |
| 236 | /// \brief Describes a source location entry (SLocEntry) for a |
| 237 | /// macro instantiation. |
Douglas Gregor | bd94500 | 2009-04-13 16:31:14 +0000 | [diff] [blame] | 238 | SM_SLOC_INSTANTIATION_ENTRY = 4, |
| 239 | /// \brief Describes the SourceManager's line table, with |
| 240 | /// information about #line directives. |
Douglas Gregor | 2eafc1b | 2009-04-26 00:07:37 +0000 | [diff] [blame] | 241 | SM_LINE_TABLE = 5, |
| 242 | /// \brief Describes one header file info [isImport, DirInfo, NumIncludes] |
| 243 | /// ControllingMacro is optional. |
| 244 | SM_HEADER_FILE_INFO = 6 |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 245 | }; |
Chris Lattner | 7c5d24e | 2009-04-10 18:00:12 +0000 | [diff] [blame] | 246 | |
| 247 | /// \brief Record types used within a preprocessor block. |
| 248 | enum PreprocessorRecordTypes { |
| 249 | // The macros in the PP section are a PP_MACRO_* instance followed by a |
| 250 | // list of PP_TOKEN instances for each token in the definition. |
| 251 | |
| 252 | /// \brief An object-like macro definition. |
| 253 | /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed] |
| 254 | PP_MACRO_OBJECT_LIKE = 1, |
| 255 | |
| 256 | /// \brief A function-like macro definition. |
| 257 | /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars, |
| 258 | /// NumArgs, ArgIdentInfoID* ] |
| 259 | PP_MACRO_FUNCTION_LIKE = 2, |
| 260 | |
| 261 | /// \brief Describes one token. |
Chris Lattner | c1f9d82 | 2009-04-13 01:29:17 +0000 | [diff] [blame] | 262 | /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags] |
Douglas Gregor | 2eafc1b | 2009-04-26 00:07:37 +0000 | [diff] [blame] | 263 | PP_TOKEN = 3 |
Chris Lattner | 7c5d24e | 2009-04-10 18:00:12 +0000 | [diff] [blame] | 264 | }; |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 265 | |
| 266 | /// \defgroup PCHAST Precompiled header AST constants |
| 267 | /// |
| 268 | /// The constants in this group describe various components of the |
| 269 | /// abstract syntax tree within a precompiled header. |
| 270 | /// |
| 271 | /// @{ |
| 272 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 273 | /// \brief Predefined type IDs. |
| 274 | /// |
| 275 | /// These type IDs correspond to predefined types in the AST |
| 276 | /// context, such as built-in types (int) and special place-holder |
| 277 | /// types (the <overload> and <dependent> type markers). Such |
| 278 | /// types are never actually serialized, since they will be built |
| 279 | /// by the AST context when it is created. |
| 280 | enum PredefinedTypeIDs { |
| 281 | /// \brief The NULL type. |
| 282 | PREDEF_TYPE_NULL_ID = 0, |
| 283 | /// \brief The void type. |
| 284 | PREDEF_TYPE_VOID_ID = 1, |
| 285 | /// \brief The 'bool' or '_Bool' type. |
| 286 | PREDEF_TYPE_BOOL_ID = 2, |
| 287 | /// \brief The 'char' type, when it is unsigned. |
| 288 | PREDEF_TYPE_CHAR_U_ID = 3, |
| 289 | /// \brief The 'unsigned char' type. |
| 290 | PREDEF_TYPE_UCHAR_ID = 4, |
| 291 | /// \brief The 'unsigned short' type. |
| 292 | PREDEF_TYPE_USHORT_ID = 5, |
| 293 | /// \brief The 'unsigned int' type. |
| 294 | PREDEF_TYPE_UINT_ID = 6, |
| 295 | /// \brief The 'unsigned long' type. |
| 296 | PREDEF_TYPE_ULONG_ID = 7, |
| 297 | /// \brief The 'unsigned long long' type. |
| 298 | PREDEF_TYPE_ULONGLONG_ID = 8, |
| 299 | /// \brief The 'char' type, when it is signed. |
| 300 | PREDEF_TYPE_CHAR_S_ID = 9, |
| 301 | /// \brief The 'signed char' type. |
| 302 | PREDEF_TYPE_SCHAR_ID = 10, |
| 303 | /// \brief The C++ 'wchar_t' type. |
| 304 | PREDEF_TYPE_WCHAR_ID = 11, |
| 305 | /// \brief The (signed) 'short' type. |
| 306 | PREDEF_TYPE_SHORT_ID = 12, |
| 307 | /// \brief The (signed) 'int' type. |
| 308 | PREDEF_TYPE_INT_ID = 13, |
| 309 | /// \brief The (signed) 'long' type. |
| 310 | PREDEF_TYPE_LONG_ID = 14, |
| 311 | /// \brief The (signed) 'long long' type. |
| 312 | PREDEF_TYPE_LONGLONG_ID = 15, |
| 313 | /// \brief The 'float' type. |
| 314 | PREDEF_TYPE_FLOAT_ID = 16, |
| 315 | /// \brief The 'double' type. |
| 316 | PREDEF_TYPE_DOUBLE_ID = 17, |
| 317 | /// \brief The 'long double' type. |
| 318 | PREDEF_TYPE_LONGDOUBLE_ID = 18, |
| 319 | /// \brief The placeholder type for overloaded function sets. |
| 320 | PREDEF_TYPE_OVERLOAD_ID = 19, |
| 321 | /// \brief The placeholder type for dependent types. |
Chris Lattner | 2df9ced | 2009-04-30 02:43:43 +0000 | [diff] [blame] | 322 | PREDEF_TYPE_DEPENDENT_ID = 20, |
| 323 | /// \brief The '__uint128_t' type. |
| 324 | PREDEF_TYPE_UINT128_ID = 21, |
| 325 | /// \brief The '__int128_t' type. |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 326 | PREDEF_TYPE_INT128_ID = 22, |
| 327 | /// \brief The type of 'nullptr'. |
Alisdair Meredith | f5c209d | 2009-07-14 06:30:34 +0000 | [diff] [blame] | 328 | PREDEF_TYPE_NULLPTR_ID = 23, |
| 329 | /// \brief The C++ 'char16_t' type. |
| 330 | PREDEF_TYPE_CHAR16_ID = 24, |
| 331 | /// \brief The C++ 'char32_t' type. |
Steve Naroff | de2e22d | 2009-07-15 18:40:39 +0000 | [diff] [blame] | 332 | PREDEF_TYPE_CHAR32_ID = 25, |
| 333 | /// \brief The ObjC 'id' type. |
| 334 | PREDEF_TYPE_OBJC_ID = 26, |
| 335 | /// \brief The ObjC 'Class' type. |
| 336 | PREDEF_TYPE_OBJC_CLASS = 27 |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 337 | }; |
| 338 | |
| 339 | /// \brief The number of predefined type IDs that are reserved for |
| 340 | /// the PREDEF_TYPE_* constants. |
| 341 | /// |
| 342 | /// Type IDs for non-predefined types will start at |
| 343 | /// NUM_PREDEF_TYPE_IDs. |
| 344 | const unsigned NUM_PREDEF_TYPE_IDS = 100; |
| 345 | |
| 346 | /// \brief Record codes for each kind of type. |
| 347 | /// |
| 348 | /// These constants describe the records that can occur within a |
| 349 | /// block identified by TYPES_BLOCK_ID in the PCH file. Each |
| 350 | /// constant describes a record for a specific type class in the |
| 351 | /// AST. |
| 352 | enum TypeCode { |
| 353 | /// \brief An ExtQualType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 354 | TYPE_EXT_QUAL = 1, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 355 | /// \brief A FixedWidthIntType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 356 | TYPE_FIXED_WIDTH_INT = 2, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 357 | /// \brief A ComplexType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 358 | TYPE_COMPLEX = 3, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 359 | /// \brief A PointerType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 360 | TYPE_POINTER = 4, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 361 | /// \brief A BlockPointerType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 362 | TYPE_BLOCK_POINTER = 5, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 363 | /// \brief An LValueReferenceType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 364 | TYPE_LVALUE_REFERENCE = 6, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 365 | /// \brief An RValueReferenceType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 366 | TYPE_RVALUE_REFERENCE = 7, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 367 | /// \brief A MemberPointerType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 368 | TYPE_MEMBER_POINTER = 8, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 369 | /// \brief A ConstantArrayType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 370 | TYPE_CONSTANT_ARRAY = 9, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 371 | /// \brief An IncompleteArrayType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 372 | TYPE_INCOMPLETE_ARRAY = 10, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 373 | /// \brief A VariableArrayType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 374 | TYPE_VARIABLE_ARRAY = 11, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 375 | /// \brief A VectorType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 376 | TYPE_VECTOR = 12, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 377 | /// \brief An ExtVectorType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 378 | TYPE_EXT_VECTOR = 13, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 379 | /// \brief A FunctionNoProtoType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 380 | TYPE_FUNCTION_NO_PROTO = 14, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 381 | /// \brief A FunctionProtoType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 382 | TYPE_FUNCTION_PROTO = 15, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 383 | /// \brief A TypedefType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 384 | TYPE_TYPEDEF = 16, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 385 | /// \brief A TypeOfExprType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 386 | TYPE_TYPEOF_EXPR = 17, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 387 | /// \brief A TypeOfType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 388 | TYPE_TYPEOF = 18, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 389 | /// \brief A RecordType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 390 | TYPE_RECORD = 19, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 391 | /// \brief An EnumType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 392 | TYPE_ENUM = 20, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 393 | /// \brief An ObjCInterfaceType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 394 | TYPE_OBJC_INTERFACE = 21, |
Steve Naroff | d1b3c2d | 2009-06-17 22:40:22 +0000 | [diff] [blame] | 395 | /// \brief An ObjCObjectPointerType record. |
Steve Naroff | c15cb2a | 2009-07-18 15:33:26 +0000 | [diff] [blame] | 396 | TYPE_OBJC_OBJECT_POINTER = 22, |
Anders Carlsson | 395b475 | 2009-06-24 19:06:50 +0000 | [diff] [blame] | 397 | /// \brief a DecltypeType record. |
Steve Naroff | c15cb2a | 2009-07-18 15:33:26 +0000 | [diff] [blame] | 398 | TYPE_DECLTYPE = 23, |
Douglas Gregor | 7e7eb3d | 2009-07-06 15:59:29 +0000 | [diff] [blame] | 399 | /// \brief A ConstantArrayWithExprType record. |
Steve Naroff | c15cb2a | 2009-07-18 15:33:26 +0000 | [diff] [blame] | 400 | TYPE_CONSTANT_ARRAY_WITH_EXPR = 24, |
Douglas Gregor | 7e7eb3d | 2009-07-06 15:59:29 +0000 | [diff] [blame] | 401 | /// \brief A ConstantArrayWithoutExprType record. |
Steve Naroff | c15cb2a | 2009-07-18 15:33:26 +0000 | [diff] [blame] | 402 | TYPE_CONSTANT_ARRAY_WITHOUT_EXPR = 25 |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 403 | }; |
| 404 | |
Douglas Gregor | ad1de00 | 2009-04-18 05:55:16 +0000 | [diff] [blame] | 405 | /// \brief The type IDs for special types constructed by semantic |
| 406 | /// analysis. |
| 407 | /// |
| 408 | /// The constants in this enumeration are indices into the |
| 409 | /// SPECIAL_TYPES record. |
| 410 | enum SpecialTypeIDs { |
| 411 | /// \brief __builtin_va_list |
Douglas Gregor | 319ac89 | 2009-04-23 22:29:11 +0000 | [diff] [blame] | 412 | SPECIAL_TYPE_BUILTIN_VA_LIST = 0, |
| 413 | /// \brief Objective-C "id" type |
| 414 | SPECIAL_TYPE_OBJC_ID = 1, |
| 415 | /// \brief Objective-C selector type |
| 416 | SPECIAL_TYPE_OBJC_SELECTOR = 2, |
| 417 | /// \brief Objective-C Protocol type |
| 418 | SPECIAL_TYPE_OBJC_PROTOCOL = 3, |
| 419 | /// \brief Objective-C Class type |
| 420 | SPECIAL_TYPE_OBJC_CLASS = 4, |
| 421 | /// \brief CFConstantString type |
| 422 | SPECIAL_TYPE_CF_CONSTANT_STRING = 5, |
| 423 | /// \brief Objective-C fast enumeration state type |
Douglas Gregor | c29f77b | 2009-07-07 16:35:42 +0000 | [diff] [blame] | 424 | SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE = 6, |
| 425 | /// \brief C FILE typedef type |
Mike Stump | 782fa30 | 2009-07-28 02:25:19 +0000 | [diff] [blame] | 426 | SPECIAL_TYPE_FILE = 7, |
| 427 | /// \brief C jmp_buf typedef type |
| 428 | SPECIAL_TYPE_jmp_buf = 8, |
| 429 | /// \brief C sigjmp_buf typedef type |
Douglas Gregor | d1571ac | 2009-08-21 00:27:50 +0000 | [diff] [blame^] | 430 | SPECIAL_TYPE_sigjmp_buf = 9, |
| 431 | /// \brief Objective-C "id" redefinition type |
| 432 | SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10, |
| 433 | /// \brief Objective-C "Class" redefinition type |
| 434 | SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11, |
Douglas Gregor | ad1de00 | 2009-04-18 05:55:16 +0000 | [diff] [blame] | 435 | }; |
| 436 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 437 | /// \brief Record codes for each kind of declaration. |
| 438 | /// |
| 439 | /// These constants describe the records that can occur within a |
| 440 | /// declarations block (identified by DECLS_BLOCK_ID). Each |
| 441 | /// constant describes a record for a specific declaration class |
| 442 | /// in the AST. |
| 443 | enum DeclCode { |
Douglas Gregor | 68a2eb0 | 2009-04-15 21:30:51 +0000 | [diff] [blame] | 444 | /// \brief Attributes attached to a declaration. |
Douglas Gregor | 68a2eb0 | 2009-04-15 21:30:51 +0000 | [diff] [blame] | 445 | DECL_ATTR = 1, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 446 | /// \brief A TranslationUnitDecl record. |
Douglas Gregor | 68a2eb0 | 2009-04-15 21:30:51 +0000 | [diff] [blame] | 447 | DECL_TRANSLATION_UNIT, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 448 | /// \brief A TypedefDecl record. |
| 449 | DECL_TYPEDEF, |
Douglas Gregor | 0a2b45e | 2009-04-13 18:14:40 +0000 | [diff] [blame] | 450 | /// \brief An EnumDecl record. |
| 451 | DECL_ENUM, |
Douglas Gregor | 8c70006 | 2009-04-13 21:20:57 +0000 | [diff] [blame] | 452 | /// \brief A RecordDecl record. |
| 453 | DECL_RECORD, |
Douglas Gregor | 0a2b45e | 2009-04-13 18:14:40 +0000 | [diff] [blame] | 454 | /// \brief An EnumConstantDecl record. |
| 455 | DECL_ENUM_CONSTANT, |
Douglas Gregor | 3a2f7e4 | 2009-04-13 22:18:37 +0000 | [diff] [blame] | 456 | /// \brief A FunctionDecl record. |
| 457 | DECL_FUNCTION, |
Steve Naroff | 53c9d8a | 2009-04-20 15:06:07 +0000 | [diff] [blame] | 458 | /// \brief A ObjCMethodDecl record. |
| 459 | DECL_OBJC_METHOD, |
Steve Naroff | 33feeb0 | 2009-04-20 20:09:33 +0000 | [diff] [blame] | 460 | /// \brief A ObjCInterfaceDecl record. |
Steve Naroff | 30833f8 | 2009-04-21 15:12:33 +0000 | [diff] [blame] | 461 | DECL_OBJC_INTERFACE, |
| 462 | /// \brief A ObjCProtocolDecl record. |
| 463 | DECL_OBJC_PROTOCOL, |
Steve Naroff | 33feeb0 | 2009-04-20 20:09:33 +0000 | [diff] [blame] | 464 | /// \brief A ObjCIvarDecl record. |
Steve Naroff | 30833f8 | 2009-04-21 15:12:33 +0000 | [diff] [blame] | 465 | DECL_OBJC_IVAR, |
| 466 | /// \brief A ObjCAtDefsFieldDecl record. |
| 467 | DECL_OBJC_AT_DEFS_FIELD, |
| 468 | /// \brief A ObjCClassDecl record. |
| 469 | DECL_OBJC_CLASS, |
| 470 | /// \brief A ObjCForwardProtocolDecl record. |
| 471 | DECL_OBJC_FORWARD_PROTOCOL, |
| 472 | /// \brief A ObjCCategoryDecl record. |
| 473 | DECL_OBJC_CATEGORY, |
| 474 | /// \brief A ObjCCategoryImplDecl record. |
| 475 | DECL_OBJC_CATEGORY_IMPL, |
| 476 | /// \brief A ObjCImplementationDecl record. |
| 477 | DECL_OBJC_IMPLEMENTATION, |
| 478 | /// \brief A ObjCCompatibleAliasDecl record. |
| 479 | DECL_OBJC_COMPATIBLE_ALIAS, |
| 480 | /// \brief A ObjCPropertyDecl record. |
| 481 | DECL_OBJC_PROPERTY, |
| 482 | /// \brief A ObjCPropertyImplDecl record. |
| 483 | DECL_OBJC_PROPERTY_IMPL, |
Douglas Gregor | 8c70006 | 2009-04-13 21:20:57 +0000 | [diff] [blame] | 484 | /// \brief A FieldDecl record. |
| 485 | DECL_FIELD, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 486 | /// \brief A VarDecl record. |
| 487 | DECL_VAR, |
Douglas Gregor | 405bad0 | 2009-04-26 22:20:50 +0000 | [diff] [blame] | 488 | /// \brief An ImplicitParamDecl record. |
| 489 | DECL_IMPLICIT_PARAM, |
Douglas Gregor | 3a2f7e4 | 2009-04-13 22:18:37 +0000 | [diff] [blame] | 490 | /// \brief A ParmVarDecl record. |
| 491 | DECL_PARM_VAR, |
| 492 | /// \brief An OriginalParmVarDecl record. |
| 493 | DECL_ORIGINAL_PARM_VAR, |
Douglas Gregor | 1028bc6 | 2009-04-13 22:49:25 +0000 | [diff] [blame] | 494 | /// \brief A FileScopeAsmDecl record. |
| 495 | DECL_FILE_SCOPE_ASM, |
| 496 | /// \brief A BlockDecl record. |
| 497 | DECL_BLOCK, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 498 | /// \brief A record that stores the set of declarations that are |
| 499 | /// lexically stored within a given DeclContext. |
| 500 | /// |
| 501 | /// The record itself is an array of declaration IDs, in the |
| 502 | /// order in which those declarations were added to the |
| 503 | /// declaration context. This data is used when iterating over |
| 504 | /// the contents of a DeclContext, e.g., via |
| 505 | /// DeclContext::decls_begin()/DeclContext::decls_end(). |
| 506 | DECL_CONTEXT_LEXICAL, |
| 507 | /// \brief A record that stores the set of declarations that are |
| 508 | /// visible from a given DeclContext. |
| 509 | /// |
| 510 | /// The record itself stores a set of mappings, each of which |
| 511 | /// associates a declaration name with one or more declaration |
| 512 | /// IDs. This data is used when performing qualified name lookup |
| 513 | /// into a DeclContext via DeclContext::lookup. |
| 514 | DECL_CONTEXT_VISIBLE |
| 515 | }; |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 516 | |
| 517 | /// \brief Record codes for each kind of statement or expression. |
| 518 | /// |
| 519 | /// These constants describe the records that describe statements |
| 520 | /// or expressions. These records can occur within either the type |
| 521 | /// or declaration blocks, so they begin with record values of |
Chris Lattner | 5947ca2 | 2009-04-27 00:44:11 +0000 | [diff] [blame] | 522 | /// 50. Each constant describes a record for a specific |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 523 | /// statement or expression class in the AST. |
| 524 | enum StmtCode { |
Douglas Gregor | 087fd53 | 2009-04-14 23:32:43 +0000 | [diff] [blame] | 525 | /// \brief A marker record that indicates that we are at the end |
| 526 | /// of an expression. |
Chris Lattner | 5947ca2 | 2009-04-27 00:44:11 +0000 | [diff] [blame] | 527 | STMT_STOP = 50, |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 528 | /// \brief A NULL expression. |
Douglas Gregor | c9490c0 | 2009-04-16 22:23:12 +0000 | [diff] [blame] | 529 | STMT_NULL_PTR, |
Douglas Gregor | 025452f | 2009-04-17 00:04:06 +0000 | [diff] [blame] | 530 | /// \brief A NullStmt record. |
| 531 | STMT_NULL, |
| 532 | /// \brief A CompoundStmt record. |
| 533 | STMT_COMPOUND, |
| 534 | /// \brief A CaseStmt record. |
| 535 | STMT_CASE, |
| 536 | /// \brief A DefaultStmt record. |
| 537 | STMT_DEFAULT, |
Douglas Gregor | 1de05fe | 2009-04-17 18:18:49 +0000 | [diff] [blame] | 538 | /// \brief A LabelStmt record. |
| 539 | STMT_LABEL, |
Douglas Gregor | 025452f | 2009-04-17 00:04:06 +0000 | [diff] [blame] | 540 | /// \brief An IfStmt record. |
| 541 | STMT_IF, |
| 542 | /// \brief A SwitchStmt record. |
| 543 | STMT_SWITCH, |
Douglas Gregor | d921cf9 | 2009-04-17 00:16:09 +0000 | [diff] [blame] | 544 | /// \brief A WhileStmt record. |
| 545 | STMT_WHILE, |
Douglas Gregor | 67d8249 | 2009-04-17 00:29:51 +0000 | [diff] [blame] | 546 | /// \brief A DoStmt record. |
| 547 | STMT_DO, |
| 548 | /// \brief A ForStmt record. |
| 549 | STMT_FOR, |
Douglas Gregor | 1de05fe | 2009-04-17 18:18:49 +0000 | [diff] [blame] | 550 | /// \brief A GotoStmt record. |
| 551 | STMT_GOTO, |
Douglas Gregor | 7d5c2f2 | 2009-04-17 18:58:21 +0000 | [diff] [blame] | 552 | /// \brief An IndirectGotoStmt record. |
| 553 | STMT_INDIRECT_GOTO, |
Douglas Gregor | d921cf9 | 2009-04-17 00:16:09 +0000 | [diff] [blame] | 554 | /// \brief A ContinueStmt record. |
| 555 | STMT_CONTINUE, |
Douglas Gregor | 025452f | 2009-04-17 00:04:06 +0000 | [diff] [blame] | 556 | /// \brief A BreakStmt record. |
| 557 | STMT_BREAK, |
Douglas Gregor | 0de9d88 | 2009-04-17 16:34:57 +0000 | [diff] [blame] | 558 | /// \brief A ReturnStmt record. |
| 559 | STMT_RETURN, |
Douglas Gregor | 84f2170 | 2009-04-17 16:55:36 +0000 | [diff] [blame] | 560 | /// \brief A DeclStmt record. |
| 561 | STMT_DECL, |
Douglas Gregor | cd7d5a9 | 2009-04-17 20:57:14 +0000 | [diff] [blame] | 562 | /// \brief An AsmStmt record. |
| 563 | STMT_ASM, |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 564 | /// \brief A PredefinedExpr record. |
| 565 | EXPR_PREDEFINED, |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 566 | /// \brief A DeclRefExpr record. |
| 567 | EXPR_DECL_REF, |
| 568 | /// \brief An IntegerLiteral record. |
| 569 | EXPR_INTEGER_LITERAL, |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 570 | /// \brief A FloatingLiteral record. |
| 571 | EXPR_FLOATING_LITERAL, |
Douglas Gregor | cb2ca73 | 2009-04-15 22:19:53 +0000 | [diff] [blame] | 572 | /// \brief An ImaginaryLiteral record. |
| 573 | EXPR_IMAGINARY_LITERAL, |
Douglas Gregor | 673ecd6 | 2009-04-15 16:35:07 +0000 | [diff] [blame] | 574 | /// \brief A StringLiteral record. |
| 575 | EXPR_STRING_LITERAL, |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 576 | /// \brief A CharacterLiteral record. |
Douglas Gregor | 087fd53 | 2009-04-14 23:32:43 +0000 | [diff] [blame] | 577 | EXPR_CHARACTER_LITERAL, |
Douglas Gregor | c04db4f | 2009-04-14 23:59:37 +0000 | [diff] [blame] | 578 | /// \brief A ParenExpr record. |
| 579 | EXPR_PAREN, |
Douglas Gregor | 0b0b77f | 2009-04-15 15:58:59 +0000 | [diff] [blame] | 580 | /// \brief A UnaryOperator record. |
| 581 | EXPR_UNARY_OPERATOR, |
| 582 | /// \brief A SizefAlignOfExpr record. |
| 583 | EXPR_SIZEOF_ALIGN_OF, |
Douglas Gregor | cb2ca73 | 2009-04-15 22:19:53 +0000 | [diff] [blame] | 584 | /// \brief An ArraySubscriptExpr record. |
| 585 | EXPR_ARRAY_SUBSCRIPT, |
Douglas Gregor | 1f0d013 | 2009-04-15 17:43:59 +0000 | [diff] [blame] | 586 | /// \brief A CallExpr record. |
| 587 | EXPR_CALL, |
| 588 | /// \brief A MemberExpr record. |
| 589 | EXPR_MEMBER, |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 590 | /// \brief A BinaryOperator record. |
| 591 | EXPR_BINARY_OPERATOR, |
Douglas Gregor | ad90e96 | 2009-04-15 22:40:36 +0000 | [diff] [blame] | 592 | /// \brief A CompoundAssignOperator record. |
| 593 | EXPR_COMPOUND_ASSIGN_OPERATOR, |
| 594 | /// \brief A ConditionOperator record. |
| 595 | EXPR_CONDITIONAL_OPERATOR, |
Douglas Gregor | 087fd53 | 2009-04-14 23:32:43 +0000 | [diff] [blame] | 596 | /// \brief An ImplicitCastExpr record. |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 597 | EXPR_IMPLICIT_CAST, |
| 598 | /// \brief A CStyleCastExpr record. |
Douglas Gregor | d3c98a0 | 2009-04-15 23:02:49 +0000 | [diff] [blame] | 599 | EXPR_CSTYLE_CAST, |
Douglas Gregor | ba6d7e7 | 2009-04-16 02:33:48 +0000 | [diff] [blame] | 600 | /// \brief A CompoundLiteralExpr record. |
| 601 | EXPR_COMPOUND_LITERAL, |
Douglas Gregor | d3c98a0 | 2009-04-15 23:02:49 +0000 | [diff] [blame] | 602 | /// \brief An ExtVectorElementExpr record. |
| 603 | EXPR_EXT_VECTOR_ELEMENT, |
Douglas Gregor | d077d75 | 2009-04-16 00:55:48 +0000 | [diff] [blame] | 604 | /// \brief An InitListExpr record. |
| 605 | EXPR_INIT_LIST, |
| 606 | /// \brief A DesignatedInitExpr record. |
| 607 | EXPR_DESIGNATED_INIT, |
| 608 | /// \brief An ImplicitValueInitExpr record. |
| 609 | EXPR_IMPLICIT_VALUE_INIT, |
Douglas Gregor | d3c98a0 | 2009-04-15 23:02:49 +0000 | [diff] [blame] | 610 | /// \brief A VAArgExpr record. |
Douglas Gregor | 44cae0c | 2009-04-15 23:33:31 +0000 | [diff] [blame] | 611 | EXPR_VA_ARG, |
Douglas Gregor | 6a2dd55 | 2009-04-17 19:05:30 +0000 | [diff] [blame] | 612 | /// \brief An AddrLabelExpr record. |
Douglas Gregor | 7d5c2f2 | 2009-04-17 18:58:21 +0000 | [diff] [blame] | 613 | EXPR_ADDR_LABEL, |
Douglas Gregor | 6a2dd55 | 2009-04-17 19:05:30 +0000 | [diff] [blame] | 614 | /// \brief A StmtExpr record. |
| 615 | EXPR_STMT, |
Douglas Gregor | 44cae0c | 2009-04-15 23:33:31 +0000 | [diff] [blame] | 616 | /// \brief A TypesCompatibleExpr record. |
| 617 | EXPR_TYPES_COMPATIBLE, |
| 618 | /// \brief A ChooseExpr record. |
| 619 | EXPR_CHOOSE, |
| 620 | /// \brief A GNUNullExpr record. |
Douglas Gregor | 94cd5d1 | 2009-04-16 00:01:45 +0000 | [diff] [blame] | 621 | EXPR_GNU_NULL, |
| 622 | /// \brief A ShuffleVectorExpr record. |
| 623 | EXPR_SHUFFLE_VECTOR, |
Douglas Gregor | 84af7c2 | 2009-04-17 19:21:43 +0000 | [diff] [blame] | 624 | /// \brief BlockExpr |
| 625 | EXPR_BLOCK, |
| 626 | /// \brief A BlockDeclRef record. |
Chris Lattner | 4dcf151a | 2009-04-22 05:57:30 +0000 | [diff] [blame] | 627 | EXPR_BLOCK_DECL_REF, |
| 628 | |
| 629 | // Objective-C |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 630 | |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 631 | /// \brief An ObjCStringLiteral record. |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 632 | EXPR_OBJC_STRING_LITERAL, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 633 | /// \brief An ObjCEncodeExpr record. |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 634 | EXPR_OBJC_ENCODE, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 635 | /// \brief An ObjCSelectorExpr record. |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 636 | EXPR_OBJC_SELECTOR_EXPR, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 637 | /// \brief An ObjCProtocolExpr record. |
Steve Naroff | c4f0bbd | 2009-04-25 14:04:28 +0000 | [diff] [blame] | 638 | EXPR_OBJC_PROTOCOL_EXPR, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 639 | /// \brief An ObjCIvarRefExpr record. |
| 640 | EXPR_OBJC_IVAR_REF_EXPR, |
| 641 | /// \brief An ObjCPropertyRefExpr record. |
| 642 | EXPR_OBJC_PROPERTY_REF_EXPR, |
Fariborz Jahanian | 09105f5 | 2009-08-20 17:02:02 +0000 | [diff] [blame] | 643 | /// \brief An ObjCImplicitSetterGetterRefExpr record. |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 644 | EXPR_OBJC_KVC_REF_EXPR, |
| 645 | /// \brief An ObjCMessageExpr record. |
| 646 | EXPR_OBJC_MESSAGE_EXPR, |
| 647 | /// \brief An ObjCSuperExpr record. |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 648 | EXPR_OBJC_SUPER_EXPR, |
Steve Naroff | f242b1b | 2009-07-24 17:54:45 +0000 | [diff] [blame] | 649 | /// \brief An ObjCIsa Expr record. |
| 650 | EXPR_OBJC_ISA, |
| 651 | |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 652 | /// \brief An ObjCForCollectionStmt record. |
| 653 | STMT_OBJC_FOR_COLLECTION, |
| 654 | /// \brief An ObjCAtCatchStmt record. |
| 655 | STMT_OBJC_CATCH, |
| 656 | /// \brief An ObjCAtFinallyStmt record. |
| 657 | STMT_OBJC_FINALLY, |
| 658 | /// \brief An ObjCAtTryStmt record. |
| 659 | STMT_OBJC_AT_TRY, |
| 660 | /// \brief An ObjCAtSynchronizedStmt record. |
| 661 | STMT_OBJC_AT_SYNCHRONIZED, |
| 662 | /// \brief An ObjCAtThrowStmt record. |
Argyrios Kyrtzidis | ba0a900 | 2009-07-14 03:19:21 +0000 | [diff] [blame] | 663 | STMT_OBJC_AT_THROW, |
| 664 | |
| 665 | // C++ |
| 666 | |
| 667 | /// \brief An CXXOperatorCallExpr record. |
| 668 | EXPR_CXX_OPERATOR_CALL |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 669 | }; |
Douglas Gregor | d077d75 | 2009-04-16 00:55:48 +0000 | [diff] [blame] | 670 | |
| 671 | /// \brief The kinds of designators that can occur in a |
| 672 | /// DesignatedInitExpr. |
| 673 | enum DesignatorTypes { |
| 674 | /// \brief Field designator where only the field name is known. |
| 675 | DESIG_FIELD_NAME = 0, |
| 676 | /// \brief Field designator where the field has been resolved to |
| 677 | /// a declaration. |
| 678 | DESIG_FIELD_DECL = 1, |
| 679 | /// \brief Array designator. |
| 680 | DESIG_ARRAY = 2, |
| 681 | /// \brief GNU array range designator. |
| 682 | DESIG_ARRAY_RANGE = 3 |
| 683 | }; |
| 684 | |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 685 | /// @} |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 686 | } |
| 687 | } // end namespace clang |
| 688 | |
| 689 | #endif |