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