Sebastian Redl | 05a0760 | 2010-08-18 23:57:26 +0000 | [diff] [blame] | 1 | //===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===// |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 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 | // |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 10 | // This header defines Bitcode enum values for Clang serialized AST files. |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 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 | |
Argyrios Kyrtzidis | c8e5d51 | 2010-08-20 16:03:59 +0000 | [diff] [blame] | 20 | #include "clang/AST/Type.h" |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 21 | #include "llvm/Bitcode/BitCodes.h" |
Chandler Carruth | 9f8eb20 | 2009-10-26 01:37:10 +0000 | [diff] [blame] | 22 | #include "llvm/System/DataTypes.h" |
Argyrios Kyrtzidis | 5d26768 | 2010-08-20 16:04:27 +0000 | [diff] [blame] | 23 | #include "llvm/ADT/DenseMap.h" |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 24 | |
| 25 | namespace clang { |
Sebastian Redl | 8538e8d | 2010-08-18 23:57:32 +0000 | [diff] [blame] | 26 | namespace serialization { |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 27 | /// \brief AST file major version number supported by this version of |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 28 | /// Clang. |
| 29 | /// |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 30 | /// Whenever the AST file format changes in a way that makes it |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 31 | /// incompatible with previous versions (such that a reader |
| 32 | /// designed for the previous version could not support reading |
| 33 | /// the new version), this number should be increased. |
Douglas Gregor | 445e23e | 2009-10-05 21:07:28 +0000 | [diff] [blame] | 34 | /// |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 35 | /// Version 4 of AST files also requires that the version control branch and |
Douglas Gregor | 445e23e | 2009-10-05 21:07:28 +0000 | [diff] [blame] | 36 | /// revision match exactly, since there is no backward compatibility of |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 37 | /// AST files at this time. |
Sebastian Redl | a93e3b5 | 2010-07-08 22:01:51 +0000 | [diff] [blame] | 38 | const unsigned VERSION_MAJOR = 4; |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 39 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 40 | /// \brief AST file minor version number supported by this version of |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 41 | /// Clang. |
| 42 | /// |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 43 | /// Whenever the AST format changes in a way that is still |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 44 | /// compatible with previous versions (such that a reader designed |
| 45 | /// for the previous version could still support reading the new |
| 46 | /// version by ignoring new kinds of subblocks), this number |
| 47 | /// should be increased. |
| 48 | const unsigned VERSION_MINOR = 0; |
| 49 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 50 | /// \brief An ID number that refers to a declaration in an AST file. |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 51 | /// |
Sebastian Redl | a93e3b5 | 2010-07-08 22:01:51 +0000 | [diff] [blame] | 52 | /// The ID numbers of declarations are consecutive (in order of |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 53 | /// discovery) and start at 2. 0 is reserved for NULL, and 1 is |
| 54 | /// reserved for the translation unit declaration. |
| 55 | typedef uint32_t DeclID; |
| 56 | |
Argyrios Kyrtzidis | eb5e998 | 2010-10-14 20:14:34 +0000 | [diff] [blame] | 57 | /// \brief a Decl::Kind/DeclID pair. |
| 58 | typedef std::pair<uint32_t, DeclID> KindDeclIDPair; |
| 59 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 60 | /// \brief An ID number that refers to a type in an AST file. |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 61 | /// |
| 62 | /// The ID of a type is partitioned into two parts: the lower |
| 63 | /// three bits are used to store the const/volatile/restrict |
| 64 | /// qualifiers (as with QualType) and the upper bits provide a |
| 65 | /// type index. The type index values are partitioned into two |
| 66 | /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type |
| 67 | /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a |
| 68 | /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are |
| 69 | /// other types that have serialized representations. |
| 70 | typedef uint32_t TypeID; |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 71 | |
Argyrios Kyrtzidis | c8e5d51 | 2010-08-20 16:03:59 +0000 | [diff] [blame] | 72 | /// \brief A type index; the type ID with the qualifier bits removed. |
| 73 | class TypeIdx { |
| 74 | uint32_t Idx; |
| 75 | public: |
| 76 | TypeIdx() : Idx(0) { } |
| 77 | explicit TypeIdx(uint32_t index) : Idx(index) { } |
| 78 | |
| 79 | uint32_t getIndex() const { return Idx; } |
| 80 | TypeID asTypeID(unsigned FastQuals) const { |
| 81 | return (Idx << Qualifiers::FastWidth) | FastQuals; |
| 82 | } |
| 83 | static TypeIdx fromTypeID(TypeID ID) { |
| 84 | return TypeIdx(ID >> Qualifiers::FastWidth); |
| 85 | } |
| 86 | }; |
| 87 | |
Argyrios Kyrtzidis | 5d26768 | 2010-08-20 16:04:27 +0000 | [diff] [blame] | 88 | /// A structure for putting "fast"-unqualified QualTypes into a |
| 89 | /// DenseMap. This uses the standard pointer hash function. |
| 90 | struct UnsafeQualTypeDenseMapInfo { |
| 91 | static inline bool isEqual(QualType A, QualType B) { return A == B; } |
| 92 | static inline QualType getEmptyKey() { |
| 93 | return QualType::getFromOpaquePtr((void*) 1); |
| 94 | } |
| 95 | static inline QualType getTombstoneKey() { |
| 96 | return QualType::getFromOpaquePtr((void*) 2); |
| 97 | } |
| 98 | static inline unsigned getHashValue(QualType T) { |
| 99 | assert(!T.getLocalFastQualifiers() && |
| 100 | "hash invalid for types with fast quals"); |
| 101 | uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr()); |
| 102 | return (unsigned(v) >> 4) ^ (unsigned(v) >> 9); |
| 103 | } |
| 104 | }; |
| 105 | |
| 106 | /// \brief Map that provides the ID numbers of each type within the |
| 107 | /// output stream, plus those deserialized from a chained PCH. |
| 108 | /// |
| 109 | /// The ID numbers of types are consecutive (in order of discovery) |
| 110 | /// and start at 1. 0 is reserved for NULL. When types are actually |
| 111 | /// stored in the stream, the ID number is shifted by 2 bits to |
| 112 | /// allow for the const/volatile qualifiers. |
| 113 | /// |
| 114 | /// Keys in the map never have const/volatile qualifiers. |
| 115 | typedef llvm::DenseMap<QualType, TypeIdx, UnsafeQualTypeDenseMapInfo> |
| 116 | TypeIdxMap; |
| 117 | |
Sebastian Redl | f73c93f | 2010-09-15 19:54:06 +0000 | [diff] [blame] | 118 | /// \brief An ID number that refers to an identifier in an AST file. |
Douglas Gregor | afaf308 | 2009-04-11 00:14:32 +0000 | [diff] [blame] | 119 | typedef uint32_t IdentID; |
| 120 | |
Sebastian Redl | f73c93f | 2010-09-15 19:54:06 +0000 | [diff] [blame] | 121 | /// \brief An ID number that refers to a macro in an AST file. |
| 122 | typedef uint32_t MacroID; |
| 123 | |
| 124 | /// \brief An ID number that refers to an ObjC selctor in an AST file. |
Steve Naroff | 90cd1bb | 2009-04-23 10:39:46 +0000 | [diff] [blame] | 125 | typedef uint32_t SelectorID; |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 126 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 127 | /// \brief Describes the various kinds of blocks that occur within |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 128 | /// an AST file. |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 129 | enum BlockIDs { |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 130 | /// \brief The AST block, which acts as a container around the |
| 131 | /// full AST block. |
| 132 | AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID, |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 133 | |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 134 | /// \brief The block containing information about the source |
| 135 | /// manager. |
| 136 | SOURCE_MANAGER_BLOCK_ID, |
| 137 | |
| 138 | /// \brief The block containing information about the |
| 139 | /// preprocessor. |
| 140 | PREPROCESSOR_BLOCK_ID, |
| 141 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 142 | /// \brief The block containing the definitions of all of the |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 143 | /// types and decls used within the AST file. |
Argyrios Kyrtzidis | 7b90340 | 2010-10-24 17:26:36 +0000 | [diff] [blame^] | 144 | DECLTYPES_BLOCK_ID, |
| 145 | |
| 146 | /// \brief The block containing DECL_UPDATES records. |
| 147 | DECL_UPDATES_BLOCK_ID |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 148 | }; |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 149 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 150 | /// \brief Record types that occur within the AST block itself. |
| 151 | enum ASTRecordTypes { |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 152 | /// \brief Record code for the offsets of each type. |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 153 | /// |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 154 | /// The TYPE_OFFSET constant describes the record that occurs |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 155 | /// within the AST block. The record itself is an array of offsets that |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 156 | /// point into the declarations and types block (identified by |
| 157 | /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 158 | /// of a type. For a given type ID @c T, the lower three bits of |
| 159 | /// @c T are its qualifiers (const, volatile, restrict), as in |
| 160 | /// the QualType class. The upper bits, after being shifted and |
| 161 | /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the |
| 162 | /// TYPE_OFFSET block to determine the offset of that type's |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 163 | /// corresponding record within the DECLTYPES_BLOCK_ID block. |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 164 | TYPE_OFFSET = 1, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 165 | |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 166 | /// \brief Record code for the offsets of each decl. |
| 167 | /// |
| 168 | /// The DECL_OFFSET constant describes the record that occurs |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 169 | /// within the block identified by DECL_OFFSETS_BLOCK_ID within |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 170 | /// the AST block. The record itself is an array of offsets that |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 171 | /// point into the declarations and types block (identified by |
| 172 | /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this |
Douglas Gregor | 8038d51 | 2009-04-10 17:25:41 +0000 | [diff] [blame] | 173 | /// record, after subtracting one to account for the use of |
| 174 | /// declaration ID 0 for a NULL declaration pointer. Index 0 is |
| 175 | /// reserved for the translation unit declaration. |
Douglas Gregor | 0a0428e | 2009-04-10 20:39:37 +0000 | [diff] [blame] | 176 | DECL_OFFSET = 2, |
| 177 | |
| 178 | /// \brief Record code for the language options table. |
| 179 | /// |
| 180 | /// The record with this code contains the contents of the |
| 181 | /// LangOptions structure. We serialize the entire contents of |
| 182 | /// the structure, and let the reader decide which options are |
| 183 | /// actually important to check. |
Douglas Gregor | 2bec041 | 2009-04-10 21:16:55 +0000 | [diff] [blame] | 184 | LANGUAGE_OPTIONS = 3, |
| 185 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 186 | /// \brief AST file metadata, including the AST file version number |
| 187 | /// and the target triple used to build the AST file. |
Douglas Gregor | ab41e63 | 2009-04-27 22:23:34 +0000 | [diff] [blame] | 188 | METADATA = 4, |
Douglas Gregor | afaf308 | 2009-04-11 00:14:32 +0000 | [diff] [blame] | 189 | |
| 190 | /// \brief Record code for the table of offsets of each |
| 191 | /// identifier ID. |
| 192 | /// |
| 193 | /// The offset table contains offsets into the blob stored in |
| 194 | /// the IDENTIFIER_TABLE record. Each offset points to the |
| 195 | /// NULL-terminated string that corresponds to that identifier. |
| 196 | IDENTIFIER_OFFSET = 5, |
| 197 | |
| 198 | /// \brief Record code for the identifier table. |
| 199 | /// |
| 200 | /// The identifier table is a simple blob that contains |
| 201 | /// NULL-terminated strings for all of the identifiers |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 202 | /// referenced by the AST file. The IDENTIFIER_OFFSET table |
Douglas Gregor | afaf308 | 2009-04-11 00:14:32 +0000 | [diff] [blame] | 203 | /// contains the mapping from identifier IDs to the characters |
| 204 | /// in this blob. Note that the starting offsets of all of the |
| 205 | /// identifiers are odd, so that, when the identifier offset |
| 206 | /// table is loaded in, we can use the low bit to distinguish |
| 207 | /// between offsets (for unresolved identifier IDs) and |
| 208 | /// IdentifierInfo pointers (for already-resolved identifier |
| 209 | /// IDs). |
Douglas Gregor | fdd0172 | 2009-04-14 00:24:19 +0000 | [diff] [blame] | 210 | IDENTIFIER_TABLE = 6, |
| 211 | |
| 212 | /// \brief Record code for the array of external definitions. |
| 213 | /// |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 214 | /// The AST file contains a list of all of the unnamed external |
Douglas Gregor | fdd0172 | 2009-04-14 00:24:19 +0000 | [diff] [blame] | 215 | /// definitions present within the parsed headers, stored as an |
| 216 | /// array of declaration IDs. These external definitions will be |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 217 | /// reported to the AST consumer after the AST file has been |
Douglas Gregor | fdd0172 | 2009-04-14 00:24:19 +0000 | [diff] [blame] | 218 | /// read, since their presence can affect the semantics of the |
| 219 | /// program (e.g., for code generation). |
Douglas Gregor | 3e1af84 | 2009-04-17 22:13:46 +0000 | [diff] [blame] | 220 | EXTERNAL_DEFINITIONS = 7, |
| 221 | |
Douglas Gregor | ad1de00 | 2009-04-18 05:55:16 +0000 | [diff] [blame] | 222 | /// \brief Record code for the set of non-builtin, special |
| 223 | /// types. |
| 224 | /// |
| 225 | /// This record contains the type IDs for the various type nodes |
| 226 | /// that are constructed during semantic analysis (e.g., |
| 227 | /// __builtin_va_list). The SPECIAL_TYPE_* constants provide |
| 228 | /// offsets into this record. |
| 229 | SPECIAL_TYPES = 8, |
| 230 | |
Douglas Gregor | 4c0e86b | 2009-04-22 22:02:47 +0000 | [diff] [blame] | 231 | /// \brief Record code for the extra statistics we gather while |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 232 | /// generating an AST file. |
Douglas Gregor | 4c0e86b | 2009-04-22 22:02:47 +0000 | [diff] [blame] | 233 | STATISTICS = 9, |
| 234 | |
| 235 | /// \brief Record code for the array of tentative definitions. |
Douglas Gregor | 14c22f2 | 2009-04-22 22:18:58 +0000 | [diff] [blame] | 236 | TENTATIVE_DEFINITIONS = 10, |
| 237 | |
| 238 | /// \brief Record code for the array of locally-scoped external |
| 239 | /// declarations. |
Steve Naroff | 90cd1bb | 2009-04-23 10:39:46 +0000 | [diff] [blame] | 240 | LOCALLY_SCOPED_EXTERNAL_DECLS = 11, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 241 | |
Douglas Gregor | 83941df | 2009-04-25 17:48:32 +0000 | [diff] [blame] | 242 | /// \brief Record code for the table of offsets into the |
| 243 | /// Objective-C method pool. |
| 244 | SELECTOR_OFFSETS = 12, |
Douglas Gregor | f0aaf7a | 2009-04-24 21:10:55 +0000 | [diff] [blame] | 245 | |
| 246 | /// \brief Record code for the Objective-C method pool, |
Douglas Gregor | 2eafc1b | 2009-04-26 00:07:37 +0000 | [diff] [blame] | 247 | METHOD_POOL = 13, |
| 248 | |
| 249 | /// \brief The value of the next __COUNTER__ to dispense. |
| 250 | /// [PP_COUNTER_VALUE, Val] |
Douglas Gregor | 7f94b0b | 2009-04-27 06:38:32 +0000 | [diff] [blame] | 251 | PP_COUNTER_VALUE = 14, |
| 252 | |
| 253 | /// \brief Record code for the table of offsets into the block |
| 254 | /// of source-location information. |
| 255 | SOURCE_LOCATION_OFFSETS = 15, |
| 256 | |
| 257 | /// \brief Record code for the set of source location entries |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 258 | /// that need to be preloaded by the AST reader. |
Douglas Gregor | 7f94b0b | 2009-04-27 06:38:32 +0000 | [diff] [blame] | 259 | /// |
| 260 | /// This set contains the source location entry for the |
| 261 | /// predefines buffer and for any file entries that need to be |
| 262 | /// preloaded. |
Douglas Gregor | 4fed3f4 | 2009-04-27 18:38:38 +0000 | [diff] [blame] | 263 | SOURCE_LOCATION_PRELOADS = 16, |
| 264 | |
| 265 | /// \brief Record code for the stat() cache. |
Douglas Gregor | b81c170 | 2009-04-27 20:06:05 +0000 | [diff] [blame] | 266 | STAT_CACHE = 17, |
| 267 | |
| 268 | /// \brief Record code for the set of ext_vector type names. |
| 269 | EXT_VECTOR_DECLS = 18, |
| 270 | |
Douglas Gregor | b64c193 | 2009-05-12 01:31:05 +0000 | [diff] [blame] | 271 | /// \brief Record code for the original file that was used to |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 272 | /// generate the AST file. |
Argyrios Kyrtzidis | 1cb35dd | 2009-07-21 00:06:20 +0000 | [diff] [blame] | 273 | ORIGINAL_FILE_NAME = 19, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 274 | |
Douglas Gregor | c6fbbed | 2010-03-19 22:13:20 +0000 | [diff] [blame] | 275 | /// Record #20 intentionally left blank. |
Douglas Gregor | 445e23e | 2009-10-05 21:07:28 +0000 | [diff] [blame] | 276 | |
Ted Kremenek | 5b4ec63 | 2010-01-22 20:59:36 +0000 | [diff] [blame] | 277 | /// \brief Record code for the version control branch and revision |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 278 | /// information of the compiler used to build this AST file. |
Tanya Lattner | e6bbc01 | 2010-02-12 00:07:30 +0000 | [diff] [blame] | 279 | VERSION_CONTROL_BRANCH_REVISION = 21, |
| 280 | |
Argyrios Kyrtzidis | 49b96d1 | 2010-08-13 18:42:17 +0000 | [diff] [blame] | 281 | /// \brief Record code for the array of unused file scoped decls. |
| 282 | UNUSED_FILESCOPED_DECLS = 22, |
Tanya Lattner | e6bbc01 | 2010-02-12 00:07:30 +0000 | [diff] [blame] | 283 | |
Douglas Gregor | 6a5a23f | 2010-03-19 21:51:54 +0000 | [diff] [blame] | 284 | /// \brief Record code for the table of offsets to macro definition |
| 285 | /// entries in the preprocessing record. |
Argyrios Kyrtzidis | d455add | 2010-07-06 15:37:04 +0000 | [diff] [blame] | 286 | MACRO_DEFINITION_OFFSETS = 23, |
| 287 | |
| 288 | /// \brief Record code for the array of VTable uses. |
| 289 | VTABLE_USES = 24, |
| 290 | |
| 291 | /// \brief Record code for the array of dynamic classes. |
Sebastian Redl | a93e3b5 | 2010-07-08 22:01:51 +0000 | [diff] [blame] | 292 | DYNAMIC_CLASSES = 25, |
| 293 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 294 | /// \brief Record code for the chained AST metadata, including the |
| 295 | /// AST file version and the name of the PCH this depends on. |
Fariborz Jahanian | 3201983 | 2010-07-23 19:11:11 +0000 | [diff] [blame] | 296 | CHAINED_METADATA = 26, |
Sebastian Redl | d692af7 | 2010-07-27 18:24:41 +0000 | [diff] [blame] | 297 | |
Sebastian Redl | 681d723 | 2010-07-27 00:17:23 +0000 | [diff] [blame] | 298 | /// \brief Record code for referenced selector pool. |
Sebastian Redl | d692af7 | 2010-07-27 18:24:41 +0000 | [diff] [blame] | 299 | REFERENCED_SELECTOR_POOL = 27, |
| 300 | |
| 301 | /// \brief Record code for an update to the TU's lexically contained |
| 302 | /// declarations. |
Argyrios Kyrtzidis | 76c38d3 | 2010-08-02 07:14:54 +0000 | [diff] [blame] | 303 | TU_UPDATE_LEXICAL = 28, |
| 304 | |
Argyrios Kyrtzidis | a865005 | 2010-08-03 17:30:10 +0000 | [diff] [blame] | 305 | /// \brief Record code for an update to first decls pointing to the |
| 306 | /// latest redeclarations. |
| 307 | REDECLS_UPDATE_LATEST = 29, |
| 308 | |
Argyrios Kyrtzidis | 76c38d3 | 2010-08-02 07:14:54 +0000 | [diff] [blame] | 309 | /// \brief Record code for declarations that Sema keeps references of. |
Argyrios Kyrtzidis | 72b9057 | 2010-08-05 09:48:08 +0000 | [diff] [blame] | 310 | SEMA_DECL_REFS = 30, |
| 311 | |
| 312 | /// \brief Record code for weak undeclared identifiers. |
Argyrios Kyrtzidis | 0e03638 | 2010-08-05 09:48:16 +0000 | [diff] [blame] | 313 | WEAK_UNDECLARED_IDENTIFIERS = 31, |
| 314 | |
| 315 | /// \brief Record code for pending implicit instantiations. |
Sebastian Redl | 0b17c61 | 2010-08-13 00:28:03 +0000 | [diff] [blame] | 316 | PENDING_IMPLICIT_INSTANTIATIONS = 32, |
| 317 | |
| 318 | /// \brief Record code for a decl replacement block. |
| 319 | /// |
| 320 | /// If a declaration is modified after having been deserialized, and then |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 321 | /// written to a dependent AST file, its ID and offset must be added to |
Sebastian Redl | 0b17c61 | 2010-08-13 00:28:03 +0000 | [diff] [blame] | 322 | /// the replacement block. |
Sebastian Redl | 8b12273 | 2010-08-24 00:49:55 +0000 | [diff] [blame] | 323 | DECL_REPLACEMENTS = 33, |
| 324 | |
| 325 | /// \brief Record code for an update to a decl context's lookup table. |
| 326 | /// |
| 327 | /// In practice, this should only be used for the TU and namespaces. |
Sebastian Redl | 6e50e00 | 2010-08-24 22:50:19 +0000 | [diff] [blame] | 328 | UPDATE_VISIBLE = 34, |
| 329 | |
| 330 | /// \brief Record code for template specializations introduced after |
| 331 | /// serializations of the original template decl. |
Argyrios Kyrtzidis | 7b90340 | 2010-10-24 17:26:36 +0000 | [diff] [blame^] | 332 | ADDITIONAL_TEMPLATE_SPECIALIZATIONS = 35, |
| 333 | |
| 334 | /// \brief Record for offsets of DECL_UPDATES records for declarations |
| 335 | /// that were modified after being deserialized and need updates. |
| 336 | DECL_UPDATE_OFFSETS = 36, |
| 337 | |
| 338 | /// \brief Record of updates for a declaration that was modified after |
| 339 | /// being deserialized. |
| 340 | DECL_UPDATES = 37 |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 341 | }; |
| 342 | |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 343 | /// \brief Record types used within a source manager block. |
| 344 | enum SourceManagerRecordTypes { |
| 345 | /// \brief Describes a source location entry (SLocEntry) for a |
| 346 | /// file. |
| 347 | SM_SLOC_FILE_ENTRY = 1, |
| 348 | /// \brief Describes a source location entry (SLocEntry) for a |
| 349 | /// buffer. |
| 350 | SM_SLOC_BUFFER_ENTRY = 2, |
| 351 | /// \brief Describes a blob that contains the data for a buffer |
| 352 | /// entry. This kind of record always directly follows a |
| 353 | /// SM_SLOC_BUFFER_ENTRY record. |
| 354 | SM_SLOC_BUFFER_BLOB = 3, |
| 355 | /// \brief Describes a source location entry (SLocEntry) for a |
| 356 | /// macro instantiation. |
Douglas Gregor | bd94500 | 2009-04-13 16:31:14 +0000 | [diff] [blame] | 357 | SM_SLOC_INSTANTIATION_ENTRY = 4, |
| 358 | /// \brief Describes the SourceManager's line table, with |
| 359 | /// information about #line directives. |
Douglas Gregor | 12fab31 | 2010-03-16 16:35:32 +0000 | [diff] [blame] | 360 | SM_LINE_TABLE = 5 |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 361 | }; |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 362 | |
Chris Lattner | 7c5d24e | 2009-04-10 18:00:12 +0000 | [diff] [blame] | 363 | /// \brief Record types used within a preprocessor block. |
| 364 | enum PreprocessorRecordTypes { |
| 365 | // The macros in the PP section are a PP_MACRO_* instance followed by a |
| 366 | // list of PP_TOKEN instances for each token in the definition. |
| 367 | |
| 368 | /// \brief An object-like macro definition. |
| 369 | /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed] |
| 370 | PP_MACRO_OBJECT_LIKE = 1, |
| 371 | |
| 372 | /// \brief A function-like macro definition. |
| 373 | /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars, |
| 374 | /// NumArgs, ArgIdentInfoID* ] |
| 375 | PP_MACRO_FUNCTION_LIKE = 2, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 376 | |
Chris Lattner | 7c5d24e | 2009-04-10 18:00:12 +0000 | [diff] [blame] | 377 | /// \brief Describes one token. |
Chris Lattner | c1f9d82 | 2009-04-13 01:29:17 +0000 | [diff] [blame] | 378 | /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags] |
Douglas Gregor | 6a5a23f | 2010-03-19 21:51:54 +0000 | [diff] [blame] | 379 | PP_TOKEN = 3, |
| 380 | |
| 381 | /// \brief Describes a macro instantiation within the preprocessing |
| 382 | /// record. |
| 383 | PP_MACRO_INSTANTIATION = 4, |
| 384 | |
| 385 | /// \brief Describes a macro definition within the preprocessing record. |
Douglas Gregor | ecdcb88 | 2010-10-20 22:00:55 +0000 | [diff] [blame] | 386 | PP_MACRO_DEFINITION = 5, |
| 387 | |
| 388 | /// \brief Describes am inclusion directive within the preprocessing |
| 389 | /// record. |
| 390 | PP_INCLUSION_DIRECTIVE = 6 |
Chris Lattner | 7c5d24e | 2009-04-10 18:00:12 +0000 | [diff] [blame] | 391 | }; |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 392 | |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 393 | /// \defgroup ASTAST AST file AST constants |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 394 | /// |
| 395 | /// The constants in this group describe various components of the |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 396 | /// abstract syntax tree within an AST file. |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 397 | /// |
| 398 | /// @{ |
| 399 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 400 | /// \brief Predefined type IDs. |
| 401 | /// |
| 402 | /// These type IDs correspond to predefined types in the AST |
| 403 | /// context, such as built-in types (int) and special place-holder |
| 404 | /// types (the <overload> and <dependent> type markers). Such |
| 405 | /// types are never actually serialized, since they will be built |
| 406 | /// by the AST context when it is created. |
| 407 | enum PredefinedTypeIDs { |
| 408 | /// \brief The NULL type. |
| 409 | PREDEF_TYPE_NULL_ID = 0, |
| 410 | /// \brief The void type. |
| 411 | PREDEF_TYPE_VOID_ID = 1, |
| 412 | /// \brief The 'bool' or '_Bool' type. |
| 413 | PREDEF_TYPE_BOOL_ID = 2, |
| 414 | /// \brief The 'char' type, when it is unsigned. |
| 415 | PREDEF_TYPE_CHAR_U_ID = 3, |
| 416 | /// \brief The 'unsigned char' type. |
| 417 | PREDEF_TYPE_UCHAR_ID = 4, |
| 418 | /// \brief The 'unsigned short' type. |
| 419 | PREDEF_TYPE_USHORT_ID = 5, |
| 420 | /// \brief The 'unsigned int' type. |
| 421 | PREDEF_TYPE_UINT_ID = 6, |
| 422 | /// \brief The 'unsigned long' type. |
| 423 | PREDEF_TYPE_ULONG_ID = 7, |
| 424 | /// \brief The 'unsigned long long' type. |
| 425 | PREDEF_TYPE_ULONGLONG_ID = 8, |
| 426 | /// \brief The 'char' type, when it is signed. |
| 427 | PREDEF_TYPE_CHAR_S_ID = 9, |
| 428 | /// \brief The 'signed char' type. |
| 429 | PREDEF_TYPE_SCHAR_ID = 10, |
| 430 | /// \brief The C++ 'wchar_t' type. |
| 431 | PREDEF_TYPE_WCHAR_ID = 11, |
| 432 | /// \brief The (signed) 'short' type. |
| 433 | PREDEF_TYPE_SHORT_ID = 12, |
| 434 | /// \brief The (signed) 'int' type. |
| 435 | PREDEF_TYPE_INT_ID = 13, |
| 436 | /// \brief The (signed) 'long' type. |
| 437 | PREDEF_TYPE_LONG_ID = 14, |
| 438 | /// \brief The (signed) 'long long' type. |
| 439 | PREDEF_TYPE_LONGLONG_ID = 15, |
| 440 | /// \brief The 'float' type. |
| 441 | PREDEF_TYPE_FLOAT_ID = 16, |
| 442 | /// \brief The 'double' type. |
| 443 | PREDEF_TYPE_DOUBLE_ID = 17, |
| 444 | /// \brief The 'long double' type. |
| 445 | PREDEF_TYPE_LONGDOUBLE_ID = 18, |
| 446 | /// \brief The placeholder type for overloaded function sets. |
| 447 | PREDEF_TYPE_OVERLOAD_ID = 19, |
| 448 | /// \brief The placeholder type for dependent types. |
Chris Lattner | 2df9ced | 2009-04-30 02:43:43 +0000 | [diff] [blame] | 449 | PREDEF_TYPE_DEPENDENT_ID = 20, |
| 450 | /// \brief The '__uint128_t' type. |
| 451 | PREDEF_TYPE_UINT128_ID = 21, |
| 452 | /// \brief The '__int128_t' type. |
Sebastian Redl | 6e8ed16 | 2009-05-10 18:38:11 +0000 | [diff] [blame] | 453 | PREDEF_TYPE_INT128_ID = 22, |
| 454 | /// \brief The type of 'nullptr'. |
Alisdair Meredith | f5c209d | 2009-07-14 06:30:34 +0000 | [diff] [blame] | 455 | PREDEF_TYPE_NULLPTR_ID = 23, |
| 456 | /// \brief The C++ 'char16_t' type. |
| 457 | PREDEF_TYPE_CHAR16_ID = 24, |
| 458 | /// \brief The C++ 'char32_t' type. |
Steve Naroff | de2e22d | 2009-07-15 18:40:39 +0000 | [diff] [blame] | 459 | PREDEF_TYPE_CHAR32_ID = 25, |
| 460 | /// \brief The ObjC 'id' type. |
| 461 | PREDEF_TYPE_OBJC_ID = 26, |
| 462 | /// \brief The ObjC 'Class' type. |
Fariborz Jahanian | 13dcd00 | 2009-11-21 19:53:08 +0000 | [diff] [blame] | 463 | PREDEF_TYPE_OBJC_CLASS = 27, |
| 464 | /// \brief The ObjC 'SEL' type. |
| 465 | PREDEF_TYPE_OBJC_SEL = 28 |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 466 | }; |
| 467 | |
| 468 | /// \brief The number of predefined type IDs that are reserved for |
| 469 | /// the PREDEF_TYPE_* constants. |
| 470 | /// |
| 471 | /// Type IDs for non-predefined types will start at |
| 472 | /// NUM_PREDEF_TYPE_IDs. |
| 473 | const unsigned NUM_PREDEF_TYPE_IDS = 100; |
| 474 | |
| 475 | /// \brief Record codes for each kind of type. |
| 476 | /// |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 477 | /// These constants describe the type records that can occur within a |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 478 | /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 479 | /// constant describes a record for a specific type class in the |
| 480 | /// AST. |
| 481 | enum TypeCode { |
| 482 | /// \brief An ExtQualType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 483 | TYPE_EXT_QUAL = 1, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 484 | /// \brief A ComplexType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 485 | TYPE_COMPLEX = 3, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 486 | /// \brief A PointerType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 487 | TYPE_POINTER = 4, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 488 | /// \brief A BlockPointerType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 489 | TYPE_BLOCK_POINTER = 5, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 490 | /// \brief An LValueReferenceType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 491 | TYPE_LVALUE_REFERENCE = 6, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 492 | /// \brief An RValueReferenceType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 493 | TYPE_RVALUE_REFERENCE = 7, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 494 | /// \brief A MemberPointerType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 495 | TYPE_MEMBER_POINTER = 8, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 496 | /// \brief A ConstantArrayType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 497 | TYPE_CONSTANT_ARRAY = 9, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 498 | /// \brief An IncompleteArrayType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 499 | TYPE_INCOMPLETE_ARRAY = 10, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 500 | /// \brief A VariableArrayType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 501 | TYPE_VARIABLE_ARRAY = 11, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 502 | /// \brief A VectorType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 503 | TYPE_VECTOR = 12, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 504 | /// \brief An ExtVectorType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 505 | TYPE_EXT_VECTOR = 13, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 506 | /// \brief A FunctionNoProtoType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 507 | TYPE_FUNCTION_NO_PROTO = 14, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 508 | /// \brief A FunctionProtoType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 509 | TYPE_FUNCTION_PROTO = 15, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 510 | /// \brief A TypedefType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 511 | TYPE_TYPEDEF = 16, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 512 | /// \brief A TypeOfExprType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 513 | TYPE_TYPEOF_EXPR = 17, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 514 | /// \brief A TypeOfType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 515 | TYPE_TYPEOF = 18, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 516 | /// \brief A RecordType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 517 | TYPE_RECORD = 19, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 518 | /// \brief An EnumType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 519 | TYPE_ENUM = 20, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 520 | /// \brief An ObjCInterfaceType record. |
Douglas Gregor | 63f5c26 | 2009-04-16 02:45:14 +0000 | [diff] [blame] | 521 | TYPE_OBJC_INTERFACE = 21, |
Steve Naroff | d1b3c2d | 2009-06-17 22:40:22 +0000 | [diff] [blame] | 522 | /// \brief An ObjCObjectPointerType record. |
Steve Naroff | c15cb2a | 2009-07-18 15:33:26 +0000 | [diff] [blame] | 523 | TYPE_OBJC_OBJECT_POINTER = 22, |
Anders Carlsson | 395b475 | 2009-06-24 19:06:50 +0000 | [diff] [blame] | 524 | /// \brief a DecltypeType record. |
John McCall | 54e14c4 | 2009-10-22 22:37:11 +0000 | [diff] [blame] | 525 | TYPE_DECLTYPE = 23, |
John McCall | 7da2431 | 2009-09-05 00:15:47 +0000 | [diff] [blame] | 526 | /// \brief An ElaboratedType record. |
John McCall | 54e14c4 | 2009-10-22 22:37:11 +0000 | [diff] [blame] | 527 | TYPE_ELABORATED = 24, |
John McCall | 49a832b | 2009-10-18 09:09:24 +0000 | [diff] [blame] | 528 | /// \brief A SubstTemplateTypeParmType record. |
John McCall | ed97649 | 2009-12-04 22:46:56 +0000 | [diff] [blame] | 529 | TYPE_SUBST_TEMPLATE_TYPE_PARM = 25, |
| 530 | /// \brief An UnresolvedUsingType record. |
John McCall | 3cb0ebd | 2010-03-10 03:28:59 +0000 | [diff] [blame] | 531 | TYPE_UNRESOLVED_USING = 26, |
| 532 | /// \brief An InjectedClassNameType record. |
John McCall | c12c5bb | 2010-05-15 11:32:37 +0000 | [diff] [blame] | 533 | TYPE_INJECTED_CLASS_NAME = 27, |
| 534 | /// \brief An ObjCObjectType record. |
Argyrios Kyrtzidis | 90b715e | 2010-06-19 19:28:53 +0000 | [diff] [blame] | 535 | TYPE_OBJC_OBJECT = 28, |
| 536 | /// \brief An TemplateTypeParmType record. |
| 537 | TYPE_TEMPLATE_TYPE_PARM = 29, |
| 538 | /// \brief An TemplateSpecializationType record. |
Argyrios Kyrtzidis | 8dfbd8b | 2010-06-24 08:57:31 +0000 | [diff] [blame] | 539 | TYPE_TEMPLATE_SPECIALIZATION = 30, |
Argyrios Kyrtzidis | 3acad62 | 2010-06-25 16:24:58 +0000 | [diff] [blame] | 540 | /// \brief A DependentNameType record. |
| 541 | TYPE_DEPENDENT_NAME = 31, |
| 542 | /// \brief A DependentTemplateSpecializationType record. |
Argyrios Kyrtzidis | ae8b17f | 2010-06-30 08:49:25 +0000 | [diff] [blame] | 543 | TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32, |
| 544 | /// \brief A DependentSizedArrayType record. |
| 545 | TYPE_DEPENDENT_SIZED_ARRAY = 33 |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 546 | }; |
| 547 | |
Douglas Gregor | ad1de00 | 2009-04-18 05:55:16 +0000 | [diff] [blame] | 548 | /// \brief The type IDs for special types constructed by semantic |
| 549 | /// analysis. |
| 550 | /// |
| 551 | /// The constants in this enumeration are indices into the |
| 552 | /// SPECIAL_TYPES record. |
| 553 | enum SpecialTypeIDs { |
| 554 | /// \brief __builtin_va_list |
Douglas Gregor | 319ac89 | 2009-04-23 22:29:11 +0000 | [diff] [blame] | 555 | SPECIAL_TYPE_BUILTIN_VA_LIST = 0, |
| 556 | /// \brief Objective-C "id" type |
| 557 | SPECIAL_TYPE_OBJC_ID = 1, |
| 558 | /// \brief Objective-C selector type |
| 559 | SPECIAL_TYPE_OBJC_SELECTOR = 2, |
| 560 | /// \brief Objective-C Protocol type |
| 561 | SPECIAL_TYPE_OBJC_PROTOCOL = 3, |
| 562 | /// \brief Objective-C Class type |
| 563 | SPECIAL_TYPE_OBJC_CLASS = 4, |
| 564 | /// \brief CFConstantString type |
| 565 | SPECIAL_TYPE_CF_CONSTANT_STRING = 5, |
| 566 | /// \brief Objective-C fast enumeration state type |
Douglas Gregor | c29f77b | 2009-07-07 16:35:42 +0000 | [diff] [blame] | 567 | SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE = 6, |
| 568 | /// \brief C FILE typedef type |
Mike Stump | 782fa30 | 2009-07-28 02:25:19 +0000 | [diff] [blame] | 569 | SPECIAL_TYPE_FILE = 7, |
| 570 | /// \brief C jmp_buf typedef type |
| 571 | SPECIAL_TYPE_jmp_buf = 8, |
| 572 | /// \brief C sigjmp_buf typedef type |
Douglas Gregor | d1571ac | 2009-08-21 00:27:50 +0000 | [diff] [blame] | 573 | SPECIAL_TYPE_sigjmp_buf = 9, |
| 574 | /// \brief Objective-C "id" redefinition type |
| 575 | SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10, |
| 576 | /// \brief Objective-C "Class" redefinition type |
Mike Stump | adaaad3 | 2009-10-20 02:12:22 +0000 | [diff] [blame] | 577 | SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11, |
| 578 | /// \brief Block descriptor type for Blocks CodeGen |
Mike Stump | 083c25e | 2009-10-22 00:49:09 +0000 | [diff] [blame] | 579 | SPECIAL_TYPE_BLOCK_DESCRIPTOR = 12, |
| 580 | /// \brief Block extedned descriptor type for Blocks CodeGen |
Fariborz Jahanian | 13dcd00 | 2009-11-21 19:53:08 +0000 | [diff] [blame] | 581 | SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR = 13, |
| 582 | /// \brief Objective-C "SEL" redefinition type |
Fariborz Jahanian | 2bb5dda | 2010-04-23 17:41:07 +0000 | [diff] [blame] | 583 | SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 14, |
| 584 | /// \brief NSConstantString type |
Argyrios Kyrtzidis | 0061138 | 2010-07-04 21:44:19 +0000 | [diff] [blame] | 585 | SPECIAL_TYPE_NS_CONSTANT_STRING = 15, |
| 586 | /// \brief Whether __[u]int128_t identifier is installed. |
| 587 | SPECIAL_TYPE_INT128_INSTALLED = 16 |
Douglas Gregor | ad1de00 | 2009-04-18 05:55:16 +0000 | [diff] [blame] | 588 | }; |
| 589 | |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 590 | /// \brief Record codes for each kind of declaration. |
| 591 | /// |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 592 | /// These constants describe the declaration records that can occur within |
| 593 | /// a declarations block (identified by DECLS_BLOCK_ID). Each |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 594 | /// constant describes a record for a specific declaration class |
| 595 | /// in the AST. |
| 596 | enum DeclCode { |
| 597 | /// \brief A TranslationUnitDecl record. |
Argyrios Kyrtzidis | 4eb9fc0 | 2010-10-18 19:20:11 +0000 | [diff] [blame] | 598 | DECL_TRANSLATION_UNIT = 50, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 599 | /// \brief A TypedefDecl record. |
| 600 | DECL_TYPEDEF, |
Douglas Gregor | 0a2b45e | 2009-04-13 18:14:40 +0000 | [diff] [blame] | 601 | /// \brief An EnumDecl record. |
| 602 | DECL_ENUM, |
Douglas Gregor | 8c70006 | 2009-04-13 21:20:57 +0000 | [diff] [blame] | 603 | /// \brief A RecordDecl record. |
| 604 | DECL_RECORD, |
Douglas Gregor | 0a2b45e | 2009-04-13 18:14:40 +0000 | [diff] [blame] | 605 | /// \brief An EnumConstantDecl record. |
| 606 | DECL_ENUM_CONSTANT, |
Douglas Gregor | 3a2f7e4 | 2009-04-13 22:18:37 +0000 | [diff] [blame] | 607 | /// \brief A FunctionDecl record. |
| 608 | DECL_FUNCTION, |
Steve Naroff | 53c9d8a | 2009-04-20 15:06:07 +0000 | [diff] [blame] | 609 | /// \brief A ObjCMethodDecl record. |
| 610 | DECL_OBJC_METHOD, |
Steve Naroff | 33feeb0 | 2009-04-20 20:09:33 +0000 | [diff] [blame] | 611 | /// \brief A ObjCInterfaceDecl record. |
Steve Naroff | 30833f8 | 2009-04-21 15:12:33 +0000 | [diff] [blame] | 612 | DECL_OBJC_INTERFACE, |
| 613 | /// \brief A ObjCProtocolDecl record. |
| 614 | DECL_OBJC_PROTOCOL, |
Steve Naroff | 33feeb0 | 2009-04-20 20:09:33 +0000 | [diff] [blame] | 615 | /// \brief A ObjCIvarDecl record. |
Steve Naroff | 30833f8 | 2009-04-21 15:12:33 +0000 | [diff] [blame] | 616 | DECL_OBJC_IVAR, |
| 617 | /// \brief A ObjCAtDefsFieldDecl record. |
| 618 | DECL_OBJC_AT_DEFS_FIELD, |
| 619 | /// \brief A ObjCClassDecl record. |
| 620 | DECL_OBJC_CLASS, |
| 621 | /// \brief A ObjCForwardProtocolDecl record. |
| 622 | DECL_OBJC_FORWARD_PROTOCOL, |
| 623 | /// \brief A ObjCCategoryDecl record. |
| 624 | DECL_OBJC_CATEGORY, |
| 625 | /// \brief A ObjCCategoryImplDecl record. |
| 626 | DECL_OBJC_CATEGORY_IMPL, |
| 627 | /// \brief A ObjCImplementationDecl record. |
| 628 | DECL_OBJC_IMPLEMENTATION, |
| 629 | /// \brief A ObjCCompatibleAliasDecl record. |
| 630 | DECL_OBJC_COMPATIBLE_ALIAS, |
| 631 | /// \brief A ObjCPropertyDecl record. |
| 632 | DECL_OBJC_PROPERTY, |
| 633 | /// \brief A ObjCPropertyImplDecl record. |
| 634 | DECL_OBJC_PROPERTY_IMPL, |
Douglas Gregor | 8c70006 | 2009-04-13 21:20:57 +0000 | [diff] [blame] | 635 | /// \brief A FieldDecl record. |
| 636 | DECL_FIELD, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 637 | /// \brief A VarDecl record. |
| 638 | DECL_VAR, |
Douglas Gregor | 405bad0 | 2009-04-26 22:20:50 +0000 | [diff] [blame] | 639 | /// \brief An ImplicitParamDecl record. |
| 640 | DECL_IMPLICIT_PARAM, |
Douglas Gregor | 3a2f7e4 | 2009-04-13 22:18:37 +0000 | [diff] [blame] | 641 | /// \brief A ParmVarDecl record. |
| 642 | DECL_PARM_VAR, |
Douglas Gregor | 1028bc6 | 2009-04-13 22:49:25 +0000 | [diff] [blame] | 643 | /// \brief A FileScopeAsmDecl record. |
| 644 | DECL_FILE_SCOPE_ASM, |
| 645 | /// \brief A BlockDecl record. |
| 646 | DECL_BLOCK, |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 647 | /// \brief A record that stores the set of declarations that are |
| 648 | /// lexically stored within a given DeclContext. |
| 649 | /// |
Sebastian Redl | 681d723 | 2010-07-27 00:17:23 +0000 | [diff] [blame] | 650 | /// The record itself is a blob that is an array of declaration IDs, |
| 651 | /// in the order in which those declarations were added to the |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 652 | /// declaration context. This data is used when iterating over |
| 653 | /// the contents of a DeclContext, e.g., via |
| 654 | /// DeclContext::decls_begin()/DeclContext::decls_end(). |
| 655 | DECL_CONTEXT_LEXICAL, |
| 656 | /// \brief A record that stores the set of declarations that are |
| 657 | /// visible from a given DeclContext. |
| 658 | /// |
| 659 | /// The record itself stores a set of mappings, each of which |
| 660 | /// associates a declaration name with one or more declaration |
| 661 | /// IDs. This data is used when performing qualified name lookup |
| 662 | /// into a DeclContext via DeclContext::lookup. |
Douglas Gregor | 0cef483 | 2010-02-21 18:22:14 +0000 | [diff] [blame] | 663 | DECL_CONTEXT_VISIBLE, |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 664 | /// \brief A NamespaceDecl rcord. |
| 665 | DECL_NAMESPACE, |
| 666 | /// \brief A NamespaceAliasDecl record. |
| 667 | DECL_NAMESPACE_ALIAS, |
| 668 | /// \brief A UsingDecl record. |
| 669 | DECL_USING, |
| 670 | /// \brief A UsingShadowDecl record. |
| 671 | DECL_USING_SHADOW, |
| 672 | /// \brief A UsingDirecitveDecl record. |
| 673 | DECL_USING_DIRECTIVE, |
| 674 | /// \brief An UnresolvedUsingValueDecl record. |
| 675 | DECL_UNRESOLVED_USING_VALUE, |
| 676 | /// \brief An UnresolvedUsingTypenameDecl record. |
| 677 | DECL_UNRESOLVED_USING_TYPENAME, |
| 678 | /// \brief A LinkageSpecDecl record. |
| 679 | DECL_LINKAGE_SPEC, |
| 680 | /// \brief A CXXRecordDecl record. |
| 681 | DECL_CXX_RECORD, |
| 682 | /// \brief A CXXMethodDecl record. |
| 683 | DECL_CXX_METHOD, |
| 684 | /// \brief A CXXConstructorDecl record. |
| 685 | DECL_CXX_CONSTRUCTOR, |
| 686 | /// \brief A CXXDestructorDecl record. |
| 687 | DECL_CXX_DESTRUCTOR, |
| 688 | /// \brief A CXXConversionDecl record. |
| 689 | DECL_CXX_CONVERSION, |
Abramo Bagnara | 6206d53 | 2010-06-05 05:09:32 +0000 | [diff] [blame] | 690 | /// \brief An AccessSpecDecl record. |
| 691 | DECL_ACCESS_SPEC, |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 692 | |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 693 | /// \brief A FriendDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 694 | DECL_FRIEND, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 695 | /// \brief A FriendTemplateDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 696 | DECL_FRIEND_TEMPLATE, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 697 | /// \brief A ClassTemplateDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 698 | DECL_CLASS_TEMPLATE, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 699 | /// \brief A ClassTemplateSpecializationDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 700 | DECL_CLASS_TEMPLATE_SPECIALIZATION, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 701 | /// \brief A ClassTemplatePartialSpecializationDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 702 | DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 703 | /// \brief A FunctionTemplateDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 704 | DECL_FUNCTION_TEMPLATE, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 705 | /// \brief A TemplateTypeParmDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 706 | DECL_TEMPLATE_TYPE_PARM, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 707 | /// \brief A NonTypeTemplateParmDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 708 | DECL_NON_TYPE_TEMPLATE_PARM, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 709 | /// \brief A TemplateTemplateParmDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 710 | DECL_TEMPLATE_TEMPLATE_PARM, |
Argyrios Kyrtzidis | 5f3dbf5 | 2010-07-22 17:28:27 +0000 | [diff] [blame] | 711 | /// \brief A StaticAssertDecl record. |
Chris Lattner | 6ad9ac0 | 2010-05-07 21:43:38 +0000 | [diff] [blame] | 712 | DECL_STATIC_ASSERT |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 713 | }; |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 714 | |
| 715 | /// \brief Record codes for each kind of statement or expression. |
| 716 | /// |
| 717 | /// These constants describe the records that describe statements |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 718 | /// or expressions. These records occur within type and declarations |
| 719 | /// block, so they begin with record values of 100. Each constant |
| 720 | /// describes a record for a specific statement or expression class in the |
| 721 | /// AST. |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 722 | enum StmtCode { |
Douglas Gregor | 087fd53 | 2009-04-14 23:32:43 +0000 | [diff] [blame] | 723 | /// \brief A marker record that indicates that we are at the end |
| 724 | /// of an expression. |
Douglas Gregor | 61d60ee | 2009-10-17 00:13:19 +0000 | [diff] [blame] | 725 | STMT_STOP = 100, |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 726 | /// \brief A NULL expression. |
Douglas Gregor | c9490c0 | 2009-04-16 22:23:12 +0000 | [diff] [blame] | 727 | STMT_NULL_PTR, |
Douglas Gregor | 025452f | 2009-04-17 00:04:06 +0000 | [diff] [blame] | 728 | /// \brief A NullStmt record. |
| 729 | STMT_NULL, |
| 730 | /// \brief A CompoundStmt record. |
| 731 | STMT_COMPOUND, |
| 732 | /// \brief A CaseStmt record. |
| 733 | STMT_CASE, |
| 734 | /// \brief A DefaultStmt record. |
| 735 | STMT_DEFAULT, |
Douglas Gregor | 1de05fe | 2009-04-17 18:18:49 +0000 | [diff] [blame] | 736 | /// \brief A LabelStmt record. |
| 737 | STMT_LABEL, |
Douglas Gregor | 025452f | 2009-04-17 00:04:06 +0000 | [diff] [blame] | 738 | /// \brief An IfStmt record. |
| 739 | STMT_IF, |
| 740 | /// \brief A SwitchStmt record. |
| 741 | STMT_SWITCH, |
Douglas Gregor | d921cf9 | 2009-04-17 00:16:09 +0000 | [diff] [blame] | 742 | /// \brief A WhileStmt record. |
| 743 | STMT_WHILE, |
Douglas Gregor | 67d8249 | 2009-04-17 00:29:51 +0000 | [diff] [blame] | 744 | /// \brief A DoStmt record. |
| 745 | STMT_DO, |
| 746 | /// \brief A ForStmt record. |
| 747 | STMT_FOR, |
Douglas Gregor | 1de05fe | 2009-04-17 18:18:49 +0000 | [diff] [blame] | 748 | /// \brief A GotoStmt record. |
| 749 | STMT_GOTO, |
Douglas Gregor | 7d5c2f2 | 2009-04-17 18:58:21 +0000 | [diff] [blame] | 750 | /// \brief An IndirectGotoStmt record. |
| 751 | STMT_INDIRECT_GOTO, |
Douglas Gregor | d921cf9 | 2009-04-17 00:16:09 +0000 | [diff] [blame] | 752 | /// \brief A ContinueStmt record. |
| 753 | STMT_CONTINUE, |
Douglas Gregor | 025452f | 2009-04-17 00:04:06 +0000 | [diff] [blame] | 754 | /// \brief A BreakStmt record. |
| 755 | STMT_BREAK, |
Douglas Gregor | 0de9d88 | 2009-04-17 16:34:57 +0000 | [diff] [blame] | 756 | /// \brief A ReturnStmt record. |
| 757 | STMT_RETURN, |
Douglas Gregor | 84f2170 | 2009-04-17 16:55:36 +0000 | [diff] [blame] | 758 | /// \brief A DeclStmt record. |
| 759 | STMT_DECL, |
Douglas Gregor | cd7d5a9 | 2009-04-17 20:57:14 +0000 | [diff] [blame] | 760 | /// \brief An AsmStmt record. |
| 761 | STMT_ASM, |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 762 | /// \brief A PredefinedExpr record. |
| 763 | EXPR_PREDEFINED, |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 764 | /// \brief A DeclRefExpr record. |
| 765 | EXPR_DECL_REF, |
| 766 | /// \brief An IntegerLiteral record. |
| 767 | EXPR_INTEGER_LITERAL, |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 768 | /// \brief A FloatingLiteral record. |
| 769 | EXPR_FLOATING_LITERAL, |
Douglas Gregor | cb2ca73 | 2009-04-15 22:19:53 +0000 | [diff] [blame] | 770 | /// \brief An ImaginaryLiteral record. |
| 771 | EXPR_IMAGINARY_LITERAL, |
Douglas Gregor | 673ecd6 | 2009-04-15 16:35:07 +0000 | [diff] [blame] | 772 | /// \brief A StringLiteral record. |
| 773 | EXPR_STRING_LITERAL, |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 774 | /// \brief A CharacterLiteral record. |
Douglas Gregor | 087fd53 | 2009-04-14 23:32:43 +0000 | [diff] [blame] | 775 | EXPR_CHARACTER_LITERAL, |
Douglas Gregor | c04db4f | 2009-04-14 23:59:37 +0000 | [diff] [blame] | 776 | /// \brief A ParenExpr record. |
| 777 | EXPR_PAREN, |
Argyrios Kyrtzidis | 37bdfe2 | 2010-06-30 08:49:18 +0000 | [diff] [blame] | 778 | /// \brief A ParenListExpr record. |
| 779 | EXPR_PAREN_LIST, |
Douglas Gregor | 0b0b77f | 2009-04-15 15:58:59 +0000 | [diff] [blame] | 780 | /// \brief A UnaryOperator record. |
| 781 | EXPR_UNARY_OPERATOR, |
Douglas Gregor | 8ecdb65 | 2010-04-28 22:16:22 +0000 | [diff] [blame] | 782 | /// \brief An OffsetOfExpr record. |
| 783 | EXPR_OFFSETOF, |
Douglas Gregor | 0b0b77f | 2009-04-15 15:58:59 +0000 | [diff] [blame] | 784 | /// \brief A SizefAlignOfExpr record. |
| 785 | EXPR_SIZEOF_ALIGN_OF, |
Douglas Gregor | cb2ca73 | 2009-04-15 22:19:53 +0000 | [diff] [blame] | 786 | /// \brief An ArraySubscriptExpr record. |
| 787 | EXPR_ARRAY_SUBSCRIPT, |
Douglas Gregor | 1f0d013 | 2009-04-15 17:43:59 +0000 | [diff] [blame] | 788 | /// \brief A CallExpr record. |
| 789 | EXPR_CALL, |
| 790 | /// \brief A MemberExpr record. |
| 791 | EXPR_MEMBER, |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 792 | /// \brief A BinaryOperator record. |
| 793 | EXPR_BINARY_OPERATOR, |
Douglas Gregor | ad90e96 | 2009-04-15 22:40:36 +0000 | [diff] [blame] | 794 | /// \brief A CompoundAssignOperator record. |
| 795 | EXPR_COMPOUND_ASSIGN_OPERATOR, |
| 796 | /// \brief A ConditionOperator record. |
| 797 | EXPR_CONDITIONAL_OPERATOR, |
Douglas Gregor | 087fd53 | 2009-04-14 23:32:43 +0000 | [diff] [blame] | 798 | /// \brief An ImplicitCastExpr record. |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 799 | EXPR_IMPLICIT_CAST, |
| 800 | /// \brief A CStyleCastExpr record. |
Douglas Gregor | d3c98a0 | 2009-04-15 23:02:49 +0000 | [diff] [blame] | 801 | EXPR_CSTYLE_CAST, |
Douglas Gregor | ba6d7e7 | 2009-04-16 02:33:48 +0000 | [diff] [blame] | 802 | /// \brief A CompoundLiteralExpr record. |
| 803 | EXPR_COMPOUND_LITERAL, |
Douglas Gregor | d3c98a0 | 2009-04-15 23:02:49 +0000 | [diff] [blame] | 804 | /// \brief An ExtVectorElementExpr record. |
| 805 | EXPR_EXT_VECTOR_ELEMENT, |
Douglas Gregor | d077d75 | 2009-04-16 00:55:48 +0000 | [diff] [blame] | 806 | /// \brief An InitListExpr record. |
| 807 | EXPR_INIT_LIST, |
| 808 | /// \brief A DesignatedInitExpr record. |
| 809 | EXPR_DESIGNATED_INIT, |
| 810 | /// \brief An ImplicitValueInitExpr record. |
| 811 | EXPR_IMPLICIT_VALUE_INIT, |
Douglas Gregor | d3c98a0 | 2009-04-15 23:02:49 +0000 | [diff] [blame] | 812 | /// \brief A VAArgExpr record. |
Douglas Gregor | 44cae0c | 2009-04-15 23:33:31 +0000 | [diff] [blame] | 813 | EXPR_VA_ARG, |
Douglas Gregor | 6a2dd55 | 2009-04-17 19:05:30 +0000 | [diff] [blame] | 814 | /// \brief An AddrLabelExpr record. |
Douglas Gregor | 7d5c2f2 | 2009-04-17 18:58:21 +0000 | [diff] [blame] | 815 | EXPR_ADDR_LABEL, |
Douglas Gregor | 6a2dd55 | 2009-04-17 19:05:30 +0000 | [diff] [blame] | 816 | /// \brief A StmtExpr record. |
| 817 | EXPR_STMT, |
Douglas Gregor | 44cae0c | 2009-04-15 23:33:31 +0000 | [diff] [blame] | 818 | /// \brief A TypesCompatibleExpr record. |
| 819 | EXPR_TYPES_COMPATIBLE, |
| 820 | /// \brief A ChooseExpr record. |
| 821 | EXPR_CHOOSE, |
| 822 | /// \brief A GNUNullExpr record. |
Douglas Gregor | 94cd5d1 | 2009-04-16 00:01:45 +0000 | [diff] [blame] | 823 | EXPR_GNU_NULL, |
| 824 | /// \brief A ShuffleVectorExpr record. |
| 825 | EXPR_SHUFFLE_VECTOR, |
Douglas Gregor | 84af7c2 | 2009-04-17 19:21:43 +0000 | [diff] [blame] | 826 | /// \brief BlockExpr |
| 827 | EXPR_BLOCK, |
| 828 | /// \brief A BlockDeclRef record. |
Chris Lattner | 4dcf151a | 2009-04-22 05:57:30 +0000 | [diff] [blame] | 829 | EXPR_BLOCK_DECL_REF, |
Douglas Gregor | 39da0b8 | 2009-09-09 23:08:42 +0000 | [diff] [blame] | 830 | |
Chris Lattner | 4dcf151a | 2009-04-22 05:57:30 +0000 | [diff] [blame] | 831 | // Objective-C |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 832 | |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 833 | /// \brief An ObjCStringLiteral record. |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 834 | EXPR_OBJC_STRING_LITERAL, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 835 | /// \brief An ObjCEncodeExpr record. |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 836 | EXPR_OBJC_ENCODE, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 837 | /// \brief An ObjCSelectorExpr record. |
Chris Lattner | 3a57a37 | 2009-04-22 06:29:42 +0000 | [diff] [blame] | 838 | EXPR_OBJC_SELECTOR_EXPR, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 839 | /// \brief An ObjCProtocolExpr record. |
Steve Naroff | c4f0bbd | 2009-04-25 14:04:28 +0000 | [diff] [blame] | 840 | EXPR_OBJC_PROTOCOL_EXPR, |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 841 | /// \brief An ObjCIvarRefExpr record. |
| 842 | EXPR_OBJC_IVAR_REF_EXPR, |
| 843 | /// \brief An ObjCPropertyRefExpr record. |
| 844 | EXPR_OBJC_PROPERTY_REF_EXPR, |
Fariborz Jahanian | 09105f5 | 2009-08-20 17:02:02 +0000 | [diff] [blame] | 845 | /// \brief An ObjCImplicitSetterGetterRefExpr record. |
Chris Lattner | 0389e6b | 2009-04-26 00:44:05 +0000 | [diff] [blame] | 846 | EXPR_OBJC_KVC_REF_EXPR, |
| 847 | /// \brief An ObjCMessageExpr record. |
| 848 | EXPR_OBJC_MESSAGE_EXPR, |
Steve Naroff | f242b1b | 2009-07-24 17:54:45 +0000 | [diff] [blame] | 849 | /// \brief An ObjCIsa Expr record. |
| 850 | EXPR_OBJC_ISA, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 851 | |
| 852 | /// \brief An ObjCForCollectionStmt record. |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 853 | STMT_OBJC_FOR_COLLECTION, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 854 | /// \brief An ObjCAtCatchStmt record. |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 855 | STMT_OBJC_CATCH, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 856 | /// \brief An ObjCAtFinallyStmt record. |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 857 | STMT_OBJC_FINALLY, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 858 | /// \brief An ObjCAtTryStmt record. |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 859 | STMT_OBJC_AT_TRY, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 860 | /// \brief An ObjCAtSynchronizedStmt record. |
Steve Naroff | 1eb5540 | 2009-04-26 18:52:16 +0000 | [diff] [blame] | 861 | STMT_OBJC_AT_SYNCHRONIZED, |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 862 | /// \brief An ObjCAtThrowStmt record. |
Argyrios Kyrtzidis | ba0a900 | 2009-07-14 03:19:21 +0000 | [diff] [blame] | 863 | STMT_OBJC_AT_THROW, |
| 864 | |
| 865 | // C++ |
Argyrios Kyrtzidis | 7cb45e3 | 2010-07-22 16:03:56 +0000 | [diff] [blame] | 866 | |
| 867 | /// \brief A CXXCatchStmt record. |
| 868 | STMT_CXX_CATCH, |
| 869 | /// \brief A CXXTryStmt record. |
| 870 | STMT_CXX_TRY, |
Argyrios Kyrtzidis | ba0a900 | 2009-07-14 03:19:21 +0000 | [diff] [blame] | 871 | |
Douglas Gregor | 39da0b8 | 2009-09-09 23:08:42 +0000 | [diff] [blame] | 872 | /// \brief A CXXOperatorCallExpr record. |
| 873 | EXPR_CXX_OPERATOR_CALL, |
Chris Lattner | 1817bd4 | 2010-05-09 05:36:05 +0000 | [diff] [blame] | 874 | /// \brief A CXXMemberCallExpr record. |
| 875 | EXPR_CXX_MEMBER_CALL, |
Douglas Gregor | 39da0b8 | 2009-09-09 23:08:42 +0000 | [diff] [blame] | 876 | /// \brief A CXXConstructExpr record. |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 877 | EXPR_CXX_CONSTRUCT, |
Argyrios Kyrtzidis | 6d00c13 | 2010-07-10 11:46:15 +0000 | [diff] [blame] | 878 | /// \brief A CXXTemporaryObjectExpr record. |
| 879 | EXPR_CXX_TEMPORARY_OBJECT, |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 880 | /// \brief A CXXStaticCastExpr record. |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 881 | EXPR_CXX_STATIC_CAST, |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 882 | /// \brief A CXXDynamicCastExpr record. |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 883 | EXPR_CXX_DYNAMIC_CAST, |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 884 | /// \brief A CXXReinterpretCastExpr record. |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 885 | EXPR_CXX_REINTERPRET_CAST, |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 886 | /// \brief A CXXConstCastExpr record. |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 887 | EXPR_CXX_CONST_CAST, |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 888 | /// \brief A CXXFunctionalCastExpr record. |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 889 | EXPR_CXX_FUNCTIONAL_CAST, |
Sebastian Redl | f29f0a2 | 2010-08-18 23:57:22 +0000 | [diff] [blame] | 890 | /// \brief A CXXBoolLiteralExpr record. |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 891 | EXPR_CXX_BOOL_LITERAL, |
Chris Lattner | 14ab24f | 2010-05-09 06:03:39 +0000 | [diff] [blame] | 892 | EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr |
| 893 | EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr). |
Chris Lattner | 2fbdfcd | 2010-05-09 06:15:05 +0000 | [diff] [blame] | 894 | EXPR_CXX_TYPEID_TYPE, // CXXTypeidExpr (of type). |
Francois Pichet | 01b7c30 | 2010-09-08 12:20:18 +0000 | [diff] [blame] | 895 | EXPR_CXX_UUIDOF_EXPR, // CXXUuidofExpr (of expr). |
| 896 | EXPR_CXX_UUIDOF_TYPE, // CXXUuidofExpr (of type). |
Chris Lattner | 2fbdfcd | 2010-05-09 06:15:05 +0000 | [diff] [blame] | 897 | EXPR_CXX_THIS, // CXXThisExpr |
Chris Lattner | 030854b | 2010-05-09 06:40:08 +0000 | [diff] [blame] | 898 | EXPR_CXX_THROW, // CXXThrowExpr |
Chris Lattner | d259836 | 2010-05-10 00:25:06 +0000 | [diff] [blame] | 899 | EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr |
| 900 | EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr |
Argyrios Kyrtzidis | 6d00c13 | 2010-07-10 11:46:15 +0000 | [diff] [blame] | 901 | |
Douglas Gregor | ed8abf1 | 2010-07-08 06:14:04 +0000 | [diff] [blame] | 902 | EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr |
Chris Lattner | 5921863 | 2010-05-10 01:22:27 +0000 | [diff] [blame] | 903 | EXPR_CXX_NEW, // CXXNewExpr |
Argyrios Kyrtzidis | 95fc98c | 2010-06-22 17:07:59 +0000 | [diff] [blame] | 904 | EXPR_CXX_DELETE, // CXXDeleteExpr |
Argyrios Kyrtzidis | de4bd18 | 2010-06-28 09:32:03 +0000 | [diff] [blame] | 905 | EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr |
Chris Lattner | d259836 | 2010-05-10 00:25:06 +0000 | [diff] [blame] | 906 | |
Sebastian Redl | 6b219d0 | 2010-09-10 20:55:54 +0000 | [diff] [blame] | 907 | EXPR_CXX_EXPR_WITH_TEMPORARIES, // CXXExprWithTemporaries |
Argyrios Kyrtzidis | 8dfbd8b | 2010-06-24 08:57:31 +0000 | [diff] [blame] | 908 | |
Sebastian Redl | 6b219d0 | 2010-09-10 20:55:54 +0000 | [diff] [blame] | 909 | EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr |
| 910 | EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr |
| 911 | EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr |
| 912 | EXPR_CXX_UNRESOLVED_MEMBER, // UnresolvedMemberExpr |
| 913 | EXPR_CXX_UNRESOLVED_LOOKUP, // UnresolvedLookupExpr |
Argyrios Kyrtzidis | 6d00c13 | 2010-07-10 11:46:15 +0000 | [diff] [blame] | 914 | |
Sebastian Redl | 6b219d0 | 2010-09-10 20:55:54 +0000 | [diff] [blame] | 915 | EXPR_CXX_UNARY_TYPE_TRAIT, // UnaryTypeTraitExpr |
| 916 | EXPR_CXX_NOEXCEPT // CXXNoexceptExpr |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 917 | }; |
Douglas Gregor | d077d75 | 2009-04-16 00:55:48 +0000 | [diff] [blame] | 918 | |
| 919 | /// \brief The kinds of designators that can occur in a |
| 920 | /// DesignatedInitExpr. |
| 921 | enum DesignatorTypes { |
| 922 | /// \brief Field designator where only the field name is known. |
| 923 | DESIG_FIELD_NAME = 0, |
| 924 | /// \brief Field designator where the field has been resolved to |
| 925 | /// a declaration. |
| 926 | DESIG_FIELD_DECL = 1, |
| 927 | /// \brief Array designator. |
| 928 | DESIG_ARRAY = 2, |
| 929 | /// \brief GNU array range designator. |
| 930 | DESIG_ARRAY_RANGE = 3 |
| 931 | }; |
| 932 | |
Douglas Gregor | 14f7900 | 2009-04-10 03:52:48 +0000 | [diff] [blame] | 933 | /// @} |
Douglas Gregor | 2cf2634 | 2009-04-09 22:27:44 +0000 | [diff] [blame] | 934 | } |
| 935 | } // end namespace clang |
| 936 | |
| 937 | #endif |