ASTBitCodes.h revision a119da0761cb6b85f53857eaee50f6ad8c5ea0a0
105a07605322dfef2b017781042043a261c5a89cdSebastian Redl//===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===// 22cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// 32cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// The LLVM Compiler Infrastructure 42cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// 52cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// This file is distributed under the University of Illinois Open Source 62cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// License. See LICENSE.TXT for details. 72cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// 82cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor//===----------------------------------------------------------------------===// 92cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// 10f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl// This header defines Bitcode enum values for Clang serialized AST files. 112cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// 122cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// The enum values defined in this file should be considered permanent. If 132cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// new features are added, they should have values added at the end of the 142cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// respective lists. 152cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor// 162cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor//===----------------------------------------------------------------------===// 172cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#ifndef LLVM_CLANG_FRONTEND_PCHBITCODES_H 182cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#define LLVM_CLANG_FRONTEND_PCHBITCODES_H 192cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 20c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis#include "clang/AST/Type.h" 212cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#include "llvm/Bitcode/BitCodes.h" 2203013fa9a0bf1ef4b907f5fec006c8f4000fdd21Michael J. Spencer#include "llvm/Support/DataTypes.h" 235d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis#include "llvm/ADT/DenseMap.h" 242cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregornamespace clang { 268538e8d43a3a9bd439c987c0de37bcbf035dd391Sebastian Redl namespace serialization { 27f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief AST file major version number supported by this version of 28ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// Clang. 29ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// 30f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// Whenever the AST file format changes in a way that makes it 31ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// incompatible with previous versions (such that a reader 32ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// designed for the previous version could not support reading 33ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// the new version), this number should be increased. 34445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor /// 35f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// Version 4 of AST files also requires that the version control branch and 36445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor /// revision match exactly, since there is no backward compatibility of 37f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// AST files at this time. 38a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl const unsigned VERSION_MAJOR = 4; 39ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor 40f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief AST file minor version number supported by this version of 41ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// Clang. 42ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// 43f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// Whenever the AST format changes in a way that is still 44ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// compatible with previous versions (such that a reader designed 45ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// for the previous version could still support reading the new 46ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// version by ignoring new kinds of subblocks), this number 47ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor /// should be increased. 48ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor const unsigned VERSION_MINOR = 0; 49ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor 5095eab176f51beed44a9bc14c0dcdd37844b23740Douglas Gregor /// \brief An ID number that refers to an identifier in an AST file. 5195eab176f51beed44a9bc14c0dcdd37844b23740Douglas Gregor /// 5295eab176f51beed44a9bc14c0dcdd37844b23740Douglas Gregor /// The ID numbers of identifiers are consecutive (in order of discovery) 5395eab176f51beed44a9bc14c0dcdd37844b23740Douglas Gregor /// and start at 1. 0 is reserved for NULL. 5495eab176f51beed44a9bc14c0dcdd37844b23740Douglas Gregor typedef uint32_t IdentifierID; 5595eab176f51beed44a9bc14c0dcdd37844b23740Douglas Gregor 56f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief An ID number that refers to a declaration in an AST file. 578038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// 58a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl /// The ID numbers of declarations are consecutive (in order of 598038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// discovery) and start at 2. 0 is reserved for NULL, and 1 is 608038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// reserved for the translation unit declaration. 618038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor typedef uint32_t DeclID; 628038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor 63eb5e9986e577b1e2bff3cca5973a2494fb593fbbArgyrios Kyrtzidis /// \brief a Decl::Kind/DeclID pair. 64eb5e9986e577b1e2bff3cca5973a2494fb593fbbArgyrios Kyrtzidis typedef std::pair<uint32_t, DeclID> KindDeclIDPair; 65eb5e9986e577b1e2bff3cca5973a2494fb593fbbArgyrios Kyrtzidis 66f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief An ID number that refers to a type in an AST file. 678038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// 688038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// The ID of a type is partitioned into two parts: the lower 698038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// three bits are used to store the const/volatile/restrict 708038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// qualifiers (as with QualType) and the upper bits provide a 718038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// type index. The type index values are partitioned into two 728038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type 738038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a 748038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are 758038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// other types that have serialized representations. 768038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor typedef uint32_t TypeID; 772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 78c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis /// \brief A type index; the type ID with the qualifier bits removed. 79c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis class TypeIdx { 80c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis uint32_t Idx; 81c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis public: 82c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis TypeIdx() : Idx(0) { } 83c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis explicit TypeIdx(uint32_t index) : Idx(index) { } 84c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis 85c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis uint32_t getIndex() const { return Idx; } 86c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis TypeID asTypeID(unsigned FastQuals) const { 87a119da0761cb6b85f53857eaee50f6ad8c5ea0a0Douglas Gregor if (Idx == uint32_t(-1)) 88a119da0761cb6b85f53857eaee50f6ad8c5ea0a0Douglas Gregor return TypeID(-1); 89a119da0761cb6b85f53857eaee50f6ad8c5ea0a0Douglas Gregor 90c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis return (Idx << Qualifiers::FastWidth) | FastQuals; 91c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis } 92c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis static TypeIdx fromTypeID(TypeID ID) { 93a119da0761cb6b85f53857eaee50f6ad8c5ea0a0Douglas Gregor if (ID == TypeID(-1)) 94a119da0761cb6b85f53857eaee50f6ad8c5ea0a0Douglas Gregor return TypeIdx(-1); 95a119da0761cb6b85f53857eaee50f6ad8c5ea0a0Douglas Gregor 96c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis return TypeIdx(ID >> Qualifiers::FastWidth); 97c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis } 98c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis }; 99c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis 1005d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// A structure for putting "fast"-unqualified QualTypes into a 1015d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// DenseMap. This uses the standard pointer hash function. 1025d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis struct UnsafeQualTypeDenseMapInfo { 1035d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis static inline bool isEqual(QualType A, QualType B) { return A == B; } 1045d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis static inline QualType getEmptyKey() { 1055d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis return QualType::getFromOpaquePtr((void*) 1); 1065d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis } 1075d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis static inline QualType getTombstoneKey() { 1085d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis return QualType::getFromOpaquePtr((void*) 2); 1095d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis } 1105d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis static inline unsigned getHashValue(QualType T) { 1115d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis assert(!T.getLocalFastQualifiers() && 1125d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis "hash invalid for types with fast quals"); 1135d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr()); 1145d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis return (unsigned(v) >> 4) ^ (unsigned(v) >> 9); 1155d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis } 1165d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis }; 1175d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis 1185d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// \brief Map that provides the ID numbers of each type within the 1195d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// output stream, plus those deserialized from a chained PCH. 1205d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// 1215d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// The ID numbers of types are consecutive (in order of discovery) 1225d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// and start at 1. 0 is reserved for NULL. When types are actually 1235d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// stored in the stream, the ID number is shifted by 2 bits to 1245d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// allow for the const/volatile qualifiers. 1255d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// 1265d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis /// Keys in the map never have const/volatile qualifiers. 1275d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis typedef llvm::DenseMap<QualType, TypeIdx, UnsafeQualTypeDenseMapInfo> 1285d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis TypeIdxMap; 1295d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis 130f73c93fea0d4b447585bc7459499ba6b822e045cSebastian Redl /// \brief An ID number that refers to an identifier in an AST file. 131afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor typedef uint32_t IdentID; 132afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor 133f73c93fea0d4b447585bc7459499ba6b822e045cSebastian Redl /// \brief An ID number that refers to a macro in an AST file. 134f73c93fea0d4b447585bc7459499ba6b822e045cSebastian Redl typedef uint32_t MacroID; 135f73c93fea0d4b447585bc7459499ba6b822e045cSebastian Redl 136f73c93fea0d4b447585bc7459499ba6b822e045cSebastian Redl /// \brief An ID number that refers to an ObjC selctor in an AST file. 13790cd1bb1baac2a0221f3642de0cbea3244b116e5Steve Naroff typedef uint32_t SelectorID; 1381eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 1397c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an 1407c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor /// AST file. 1417c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor typedef uint32_t CXXBaseSpecifiersID; 1427c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor 14386c67d8802a9e0887c31c850188991465ac3c1bdDouglas Gregor /// \brief An ID number that refers to an entity in the detailed 14486c67d8802a9e0887c31c850188991465ac3c1bdDouglas Gregor /// preprocessing record. 14586c67d8802a9e0887c31c850188991465ac3c1bdDouglas Gregor typedef uint32_t PreprocessedEntityID; 14686c67d8802a9e0887c31c850188991465ac3c1bdDouglas Gregor 1472cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief Describes the various kinds of blocks that occur within 148f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// an AST file. 1492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor enum BlockIDs { 150f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief The AST block, which acts as a container around the 151f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// full AST block. 152f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID, 15314f79002e58556798e86168c63e48d533287eda5Douglas Gregor 15414f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief The block containing information about the source 15514f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// manager. 15614f79002e58556798e86168c63e48d533287eda5Douglas Gregor SOURCE_MANAGER_BLOCK_ID, 15714f79002e58556798e86168c63e48d533287eda5Douglas Gregor 15814f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief The block containing information about the 15914f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// preprocessor. 16014f79002e58556798e86168c63e48d533287eda5Douglas Gregor PREPROCESSOR_BLOCK_ID, 16114f79002e58556798e86168c63e48d533287eda5Douglas Gregor 1622cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The block containing the definitions of all of the 163f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// types and decls used within the AST file. 1647b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis DECLTYPES_BLOCK_ID, 1657b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis 1667b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis /// \brief The block containing DECL_UPDATES records. 1674800a5c79023271408af49797e09be32aca93232Douglas Gregor DECL_UPDATES_BLOCK_ID, 1684800a5c79023271408af49797e09be32aca93232Douglas Gregor 1694800a5c79023271408af49797e09be32aca93232Douglas Gregor /// \brief The block containing the detailed preprocessing record. 1704800a5c79023271408af49797e09be32aca93232Douglas Gregor PREPROCESSOR_DETAIL_BLOCK_ID 1718038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor }; 1722cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 173f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief Record types that occur within the AST block itself. 174f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl enum ASTRecordTypes { 17561d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// \brief Record code for the offsets of each type. 1762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 1778038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// The TYPE_OFFSET constant describes the record that occurs 178f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// within the AST block. The record itself is an array of offsets that 17961d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// point into the declarations and types block (identified by 18061d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID 1818038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// of a type. For a given type ID @c T, the lower three bits of 1828038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// @c T are its qualifiers (const, volatile, restrict), as in 1838038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// the QualType class. The upper bits, after being shifted and 1848038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the 1858038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// TYPE_OFFSET block to determine the offset of that type's 18661d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// corresponding record within the DECLTYPES_BLOCK_ID block. 1878038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor TYPE_OFFSET = 1, 1881eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 1898038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// \brief Record code for the offsets of each decl. 1908038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// 1918038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// The DECL_OFFSET constant describes the record that occurs 19261d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// within the block identified by DECL_OFFSETS_BLOCK_ID within 193f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// the AST block. The record itself is an array of offsets that 19461d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// point into the declarations and types block (identified by 19561d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this 1968038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// record, after subtracting one to account for the use of 1978038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// declaration ID 0 for a NULL declaration pointer. Index 0 is 1988038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor /// reserved for the translation unit declaration. 1990a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor DECL_OFFSET = 2, 2000a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor 2010a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor /// \brief Record code for the language options table. 2020a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor /// 2030a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor /// The record with this code contains the contents of the 2040a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor /// LangOptions structure. We serialize the entire contents of 2050a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor /// the structure, and let the reader decide which options are 2060a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor /// actually important to check. 2072bec0410d268779f601bd509e0302a500af7ac6aDouglas Gregor LANGUAGE_OPTIONS = 3, 2082bec0410d268779f601bd509e0302a500af7ac6aDouglas Gregor 209f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief AST file metadata, including the AST file version number 210f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// and the target triple used to build the AST file. 211ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor METADATA = 4, 212afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor 213afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// \brief Record code for the table of offsets of each 214afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// identifier ID. 215afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// 216afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// The offset table contains offsets into the blob stored in 217afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// the IDENTIFIER_TABLE record. Each offset points to the 218afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// NULL-terminated string that corresponds to that identifier. 219afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor IDENTIFIER_OFFSET = 5, 220afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor 221afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// \brief Record code for the identifier table. 222afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// 223afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// The identifier table is a simple blob that contains 224afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// NULL-terminated strings for all of the identifiers 225f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// referenced by the AST file. The IDENTIFIER_OFFSET table 226afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// contains the mapping from identifier IDs to the characters 227afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// in this blob. Note that the starting offsets of all of the 228afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// identifiers are odd, so that, when the identifier offset 229afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// table is loaded in, we can use the low bit to distinguish 230afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// between offsets (for unresolved identifier IDs) and 231afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// IdentifierInfo pointers (for already-resolved identifier 232afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor /// IDs). 233fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor IDENTIFIER_TABLE = 6, 234fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor 235fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor /// \brief Record code for the array of external definitions. 236fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor /// 237f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// The AST file contains a list of all of the unnamed external 238fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor /// definitions present within the parsed headers, stored as an 239fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor /// array of declaration IDs. These external definitions will be 240f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// reported to the AST consumer after the AST file has been 241fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor /// read, since their presence can affect the semantics of the 242fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor /// program (e.g., for code generation). 2433e1af84bb0092a1aafb49deaa4ab6664c9a9071bDouglas Gregor EXTERNAL_DEFINITIONS = 7, 2443e1af84bb0092a1aafb49deaa4ab6664c9a9071bDouglas Gregor 245ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// \brief Record code for the set of non-builtin, special 246ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// types. 247ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// 248ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// This record contains the type IDs for the various type nodes 249ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// that are constructed during semantic analysis (e.g., 250ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// __builtin_va_list). The SPECIAL_TYPE_* constants provide 251ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// offsets into this record. 252ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor SPECIAL_TYPES = 8, 253ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor 2544c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor /// \brief Record code for the extra statistics we gather while 255f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// generating an AST file. 2564c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor STATISTICS = 9, 2574c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor 2584c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor /// \brief Record code for the array of tentative definitions. 25914c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor TENTATIVE_DEFINITIONS = 10, 26014c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor 26114c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor /// \brief Record code for the array of locally-scoped external 26214c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor /// declarations. 26390cd1bb1baac2a0221f3642de0cbea3244b116e5Steve Naroff LOCALLY_SCOPED_EXTERNAL_DECLS = 11, 2641eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 26583941df2745d69c05acee3174c7a265c206f70d9Douglas Gregor /// \brief Record code for the table of offsets into the 26683941df2745d69c05acee3174c7a265c206f70d9Douglas Gregor /// Objective-C method pool. 26783941df2745d69c05acee3174c7a265c206f70d9Douglas Gregor SELECTOR_OFFSETS = 12, 268f0aaf7a59729a4ae0146e3464ee987745be95829Douglas Gregor 269f0aaf7a59729a4ae0146e3464ee987745be95829Douglas Gregor /// \brief Record code for the Objective-C method pool, 2702eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor METHOD_POOL = 13, 2712eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor 2722eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor /// \brief The value of the next __COUNTER__ to dispense. 2732eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor /// [PP_COUNTER_VALUE, Val] 2747f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor PP_COUNTER_VALUE = 14, 2757f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor 2767f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// \brief Record code for the table of offsets into the block 2777f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// of source-location information. 2787f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor SOURCE_LOCATION_OFFSETS = 15, 2797f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor 2807f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// \brief Record code for the set of source location entries 281f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// that need to be preloaded by the AST reader. 2827f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// 2837f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// This set contains the source location entry for the 2847f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// predefines buffer and for any file entries that need to be 2857f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor /// preloaded. 2864fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor SOURCE_LOCATION_PRELOADS = 16, 2874fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor 2884fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor /// \brief Record code for the stat() cache. 289b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor STAT_CACHE = 17, 290b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor 291b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor /// \brief Record code for the set of ext_vector type names. 292b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor EXT_VECTOR_DECLS = 18, 293b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor 294b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor /// \brief Record code for the original file that was used to 295f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// generate the AST file. 2961cb35dd4840d21cec58648361180d5688446a9caArgyrios Kyrtzidis ORIGINAL_FILE_NAME = 19, 2971eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 29831d375f056447d4e2418275d4913661d3bfedb3eDouglas Gregor /// \brief Record code for the file ID of the original file used to 29931d375f056447d4e2418275d4913661d3bfedb3eDouglas Gregor /// generate the AST file. 30031d375f056447d4e2418275d4913661d3bfedb3eDouglas Gregor ORIGINAL_FILE_ID = 20, 301445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor 3025b4ec636637c9d876102240127cc0dca9280e83aTed Kremenek /// \brief Record code for the version control branch and revision 303f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// information of the compiler used to build this AST file. 304e6bbc01d1c4ec5241df36042e0a4a12a6711934bTanya Lattner VERSION_CONTROL_BRANCH_REVISION = 21, 305e6bbc01d1c4ec5241df36042e0a4a12a6711934bTanya Lattner 30649b96d1a382ae9f31456166f1a734d3f7f30b992Argyrios Kyrtzidis /// \brief Record code for the array of unused file scoped decls. 30749b96d1a382ae9f31456166f1a734d3f7f30b992Argyrios Kyrtzidis UNUSED_FILESCOPED_DECLS = 22, 308e6bbc01d1c4ec5241df36042e0a4a12a6711934bTanya Lattner 3096a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor /// \brief Record code for the table of offsets to macro definition 3106a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor /// entries in the preprocessing record. 311d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis MACRO_DEFINITION_OFFSETS = 23, 312d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis 313d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis /// \brief Record code for the array of VTable uses. 314d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis VTABLE_USES = 24, 315d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis 316d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis /// \brief Record code for the array of dynamic classes. 317a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl DYNAMIC_CLASSES = 25, 318a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl 319f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief Record code for the chained AST metadata, including the 320f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// AST file version and the name of the PCH this depends on. 321320198303df7c16950d83ae79c3f702b84badcf7Fariborz Jahanian CHAINED_METADATA = 26, 322d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl 323681d7237e1014bf64dd5ead6bf74ae55cdd19e61Sebastian Redl /// \brief Record code for referenced selector pool. 324d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl REFERENCED_SELECTOR_POOL = 27, 325d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl 326d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl /// \brief Record code for an update to the TU's lexically contained 327d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl /// declarations. 32876c38d385447b7acdff2d7e6b13fa8580e7174a7Argyrios Kyrtzidis TU_UPDATE_LEXICAL = 28, 32976c38d385447b7acdff2d7e6b13fa8580e7174a7Argyrios Kyrtzidis 330a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis /// \brief Record code for an update to first decls pointing to the 331a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis /// latest redeclarations. 332a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis REDECLS_UPDATE_LATEST = 29, 333a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis 33476c38d385447b7acdff2d7e6b13fa8580e7174a7Argyrios Kyrtzidis /// \brief Record code for declarations that Sema keeps references of. 33572b90571b1783b17c3f2204cec5ca440edc38beeArgyrios Kyrtzidis SEMA_DECL_REFS = 30, 33672b90571b1783b17c3f2204cec5ca440edc38beeArgyrios Kyrtzidis 33772b90571b1783b17c3f2204cec5ca440edc38beeArgyrios Kyrtzidis /// \brief Record code for weak undeclared identifiers. 3380e0363866792b309d70e9c8e92b4c239773af89cArgyrios Kyrtzidis WEAK_UNDECLARED_IDENTIFIERS = 31, 3390e0363866792b309d70e9c8e92b4c239773af89cArgyrios Kyrtzidis 3400e0363866792b309d70e9c8e92b4c239773af89cArgyrios Kyrtzidis /// \brief Record code for pending implicit instantiations. 3410b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl PENDING_IMPLICIT_INSTANTIATIONS = 32, 3420b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl 3430b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl /// \brief Record code for a decl replacement block. 3440b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl /// 3450b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl /// If a declaration is modified after having been deserialized, and then 346f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// written to a dependent AST file, its ID and offset must be added to 3470b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl /// the replacement block. 3488b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl DECL_REPLACEMENTS = 33, 3498b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl 3508b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl /// \brief Record code for an update to a decl context's lookup table. 3518b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl /// 3528b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl /// In practice, this should only be used for the TU and namespaces. 3536e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl UPDATE_VISIBLE = 34, 3546e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl 3557b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis /// \brief Record for offsets of DECL_UPDATES records for declarations 3567b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis /// that were modified after being deserialized and need updates. 357bef1a7b9c175d37e4a727e6ce68bd05232fa6970Argyrios Kyrtzidis DECL_UPDATE_OFFSETS = 35, 3587b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis 3597b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis /// \brief Record of updates for a declaration that was modified after 3607b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8Argyrios Kyrtzidis /// being deserialized. 3617c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor DECL_UPDATES = 36, 3627c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor 3637c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor /// \brief Record code for the table of offsets to CXXBaseSpecifier 3647c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor /// sets. 365f41d3be39980d40849850d3fb90403623cc8459eArgyrios Kyrtzidis CXX_BASE_SPECIFIER_OFFSETS = 37, 366f41d3be39980d40849850d3fb90403623cc8459eArgyrios Kyrtzidis 3673efd52cf8f4e57c5571bd8cc3168264c3bc46a1eArgyrios Kyrtzidis /// \brief Record code for #pragma diagnostic mappings. 36814b6ba77710d6431794d65c7d58c6f29c3dc956ePeter Collingbourne DIAG_PRAGMA_MAPPINGS = 38, 36914b6ba77710d6431794d65c7d58c6f29c3dc956ePeter Collingbourne 37014b6ba77710d6431794d65c7d58c6f29c3dc956ePeter Collingbourne /// \brief Record code for special CUDA declarations. 371cfbf1c7536e016dc275139dd842d4a5f059a749fDouglas Gregor CUDA_SPECIAL_DECL_REFS = 39, 372cfbf1c7536e016dc275139dd842d4a5f059a749fDouglas Gregor 373cfbf1c7536e016dc275139dd842d4a5f059a749fDouglas Gregor /// \brief Record code for header search information. 3748e3df4d0864f0a966c20088ca1a29c3398b7639dArgyrios Kyrtzidis HEADER_SEARCH_TABLE = 40, 3758e3df4d0864f0a966c20088ca1a29c3398b7639dArgyrios Kyrtzidis 3768e3df4d0864f0a966c20088ca1a29c3398b7639dArgyrios Kyrtzidis /// \brief The directory that the PCH was originally created in. 37784bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbcPeter Collingbourne ORIGINAL_PCH_DIR = 41, 37884bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbcPeter Collingbourne 37984bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbcPeter Collingbourne /// \brief Record code for floating point #pragma options. 38084bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbcPeter Collingbourne FP_PRAGMA_OPTIONS = 42, 38184bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbcPeter Collingbourne 38284bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbcPeter Collingbourne /// \brief Record code for enabled OpenCL extensions. 383ebcbe1d3dc7d4f0c1f540a632fa0684dd0a857d5Sean Hunt OPENCL_EXTENSIONS = 43, 384ebcbe1d3dc7d4f0c1f540a632fa0684dd0a857d5Sean Hunt 385ebcbe1d3dc7d4f0c1f540a632fa0684dd0a857d5Sean Hunt /// \brief The list of delegating constructor declarations. 3864cdb0e2a2e9d93805e5ceaf8bc7018bdd166aec1Argyrios Kyrtzidis DELEGATING_CTORS = 44, 3874cdb0e2a2e9d93805e5ceaf8bc7018bdd166aec1Argyrios Kyrtzidis 3884cdb0e2a2e9d93805e5ceaf8bc7018bdd166aec1Argyrios Kyrtzidis /// \brief Record code for the table of offsets into the block 3894cdb0e2a2e9d93805e5ceaf8bc7018bdd166aec1Argyrios Kyrtzidis /// of file source-location information. 390d8bba9c15230d2b1b3893e272106aa79efc50251Douglas Gregor FILE_SOURCE_LOCATION_OFFSETS = 45, 391d8bba9c15230d2b1b3893e272106aa79efc50251Douglas Gregor 392d8bba9c15230d2b1b3893e272106aa79efc50251Douglas Gregor /// \brief Record code for the set of known namespaces, which are used 393d8bba9c15230d2b1b3893e272106aa79efc50251Douglas Gregor /// for typo correction. 394f62d43d2afe1960755a1b5813cae1e5983bcac1bDouglas Gregor KNOWN_NAMESPACES = 46, 3954cdb0e2a2e9d93805e5ceaf8bc7018bdd166aec1Argyrios Kyrtzidis 3965d51a1d22d862dfae44eaa098af4e09bbfebae72Douglas Gregor /// \brief Record code for the remapping information used to relate 3975d51a1d22d862dfae44eaa098af4e09bbfebae72Douglas Gregor /// loaded modules to the various offsets and IDs(e.g., source location 3985d51a1d22d862dfae44eaa098af4e09bbfebae72Douglas Gregor /// offests, declaration and type IDs) that are used in that module to 3995d51a1d22d862dfae44eaa098af4e09bbfebae72Douglas Gregor /// refer to other modules. 4005d51a1d22d862dfae44eaa098af4e09bbfebae72Douglas Gregor MODULE_OFFSET_MAP = 47, 401f62d43d2afe1960755a1b5813cae1e5983bcac1bDouglas Gregor 402f62d43d2afe1960755a1b5813cae1e5983bcac1bDouglas Gregor /// \brief Record code for the source manager line table information, 403f62d43d2afe1960755a1b5813cae1e5983bcac1bDouglas Gregor /// which stores information about #line directives. 404f62d43d2afe1960755a1b5813cae1e5983bcac1bDouglas Gregor SOURCE_MANAGER_LINE_TABLE = 48 4052cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor }; 4062cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 40714f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief Record types used within a source manager block. 40814f79002e58556798e86168c63e48d533287eda5Douglas Gregor enum SourceManagerRecordTypes { 40914f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief Describes a source location entry (SLocEntry) for a 41014f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// file. 41114f79002e58556798e86168c63e48d533287eda5Douglas Gregor SM_SLOC_FILE_ENTRY = 1, 41214f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief Describes a source location entry (SLocEntry) for a 41314f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// buffer. 41414f79002e58556798e86168c63e48d533287eda5Douglas Gregor SM_SLOC_BUFFER_ENTRY = 2, 41514f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief Describes a blob that contains the data for a buffer 41614f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// entry. This kind of record always directly follows a 41714f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// SM_SLOC_BUFFER_ENTRY record. 41814f79002e58556798e86168c63e48d533287eda5Douglas Gregor SM_SLOC_BUFFER_BLOB = 3, 41914f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// \brief Describes a source location entry (SLocEntry) for a 420f70d12dbd49fcc25f1dfc0127217112ae76bcb8fChandler Carruth /// macro expansion. 421f62d43d2afe1960755a1b5813cae1e5983bcac1bDouglas Gregor SM_SLOC_EXPANSION_ENTRY = 4 42214f79002e58556798e86168c63e48d533287eda5Douglas Gregor }; 4231eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 4247c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// \brief Record types used within a preprocessor block. 4257c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner enum PreprocessorRecordTypes { 4267c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner // The macros in the PP section are a PP_MACRO_* instance followed by a 4277c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner // list of PP_TOKEN instances for each token in the definition. 4287c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner 4297c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// \brief An object-like macro definition. 4307c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed] 4317c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner PP_MACRO_OBJECT_LIKE = 1, 4327c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner 4337c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// \brief A function-like macro definition. 4347c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars, 4357c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// NumArgs, ArgIdentInfoID* ] 4367c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner PP_MACRO_FUNCTION_LIKE = 2, 4371eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 4387c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner /// \brief Describes one token. 439c1f9d828c733ec1eba06d01070735d1f36fda733Chris Lattner /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags] 4404800a5c79023271408af49797e09be32aca93232Douglas Gregor PP_TOKEN = 3 4414800a5c79023271408af49797e09be32aca93232Douglas Gregor }; 4426a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor 4434800a5c79023271408af49797e09be32aca93232Douglas Gregor /// \brief Record types used within a preprocessor detail block. 4444800a5c79023271408af49797e09be32aca93232Douglas Gregor enum PreprocessorDetailRecordTypes { 445f70d12dbd49fcc25f1dfc0127217112ae76bcb8fChandler Carruth /// \brief Describes a macro expansion within the preprocessing record. 446f70d12dbd49fcc25f1dfc0127217112ae76bcb8fChandler Carruth PPD_MACRO_EXPANSION = 0, 4476a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor 4486a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor /// \brief Describes a macro definition within the preprocessing record. 4494800a5c79023271408af49797e09be32aca93232Douglas Gregor PPD_MACRO_DEFINITION = 1, 450ecdcb883cbc6bb4a2445dc6f02d58d9bdb54a0edDouglas Gregor 4514800a5c79023271408af49797e09be32aca93232Douglas Gregor /// \brief Describes an inclusion directive within the preprocessing 452ecdcb883cbc6bb4a2445dc6f02d58d9bdb54a0edDouglas Gregor /// record. 4534800a5c79023271408af49797e09be32aca93232Douglas Gregor PPD_INCLUSION_DIRECTIVE = 2 4547c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner }; 4554800a5c79023271408af49797e09be32aca93232Douglas Gregor 456f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \defgroup ASTAST AST file AST constants 45714f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// 45814f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// The constants in this group describe various components of the 459f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// abstract syntax tree within an AST file. 46014f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// 46114f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// @{ 46214f79002e58556798e86168c63e48d533287eda5Douglas Gregor 4632cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief Predefined type IDs. 4642cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 4652cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// These type IDs correspond to predefined types in the AST 4662cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// context, such as built-in types (int) and special place-holder 4672cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// types (the <overload> and <dependent> type markers). Such 4682cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// types are never actually serialized, since they will be built 4692cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// by the AST context when it is created. 4702cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor enum PredefinedTypeIDs { 4712cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The NULL type. 4722cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_NULL_ID = 0, 4732cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The void type. 4742cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_VOID_ID = 1, 4752cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'bool' or '_Bool' type. 4762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_BOOL_ID = 2, 4772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'char' type, when it is unsigned. 4782cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_CHAR_U_ID = 3, 4792cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'unsigned char' type. 4802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_UCHAR_ID = 4, 4812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'unsigned short' type. 4822cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_USHORT_ID = 5, 4832cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'unsigned int' type. 4842cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_UINT_ID = 6, 4852cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'unsigned long' type. 4862cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_ULONG_ID = 7, 4872cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'unsigned long long' type. 4882cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_ULONGLONG_ID = 8, 4892cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'char' type, when it is signed. 4902cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_CHAR_S_ID = 9, 4912cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'signed char' type. 4922cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_SCHAR_ID = 10, 4932cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The C++ 'wchar_t' type. 4942cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_WCHAR_ID = 11, 4952cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The (signed) 'short' type. 4962cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_SHORT_ID = 12, 4972cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The (signed) 'int' type. 4982cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_INT_ID = 13, 4992cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The (signed) 'long' type. 5002cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_LONG_ID = 14, 5012cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The (signed) 'long long' type. 5022cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_LONGLONG_ID = 15, 5032cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'float' type. 5042cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_FLOAT_ID = 16, 5052cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'double' type. 5062cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_DOUBLE_ID = 17, 5072cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The 'long double' type. 5082cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_LONGDOUBLE_ID = 18, 5092cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The placeholder type for overloaded function sets. 5102cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor PREDEF_TYPE_OVERLOAD_ID = 19, 5112cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The placeholder type for dependent types. 5122df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner PREDEF_TYPE_DEPENDENT_ID = 20, 5132df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner /// \brief The '__uint128_t' type. 5142df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner PREDEF_TYPE_UINT128_ID = 21, 5152df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner /// \brief The '__int128_t' type. 5166e8ed16ffef02b82995a90bdcf10ffff7d63839aSebastian Redl PREDEF_TYPE_INT128_ID = 22, 5176e8ed16ffef02b82995a90bdcf10ffff7d63839aSebastian Redl /// \brief The type of 'nullptr'. 518f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith PREDEF_TYPE_NULLPTR_ID = 23, 519f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith /// \brief The C++ 'char16_t' type. 520f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith PREDEF_TYPE_CHAR16_ID = 24, 521f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith /// \brief The C++ 'char32_t' type. 522de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff PREDEF_TYPE_CHAR32_ID = 25, 523de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff /// \brief The ObjC 'id' type. 524de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff PREDEF_TYPE_OBJC_ID = 26, 525de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff /// \brief The ObjC 'Class' type. 52613dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian PREDEF_TYPE_OBJC_CLASS = 27, 52713dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian /// \brief The ObjC 'SEL' type. 5281de4d4e8cb2e9c88809fea8092bc6e835a5473d2John McCall PREDEF_TYPE_OBJC_SEL = 28, 529864c041e118155c2b1ce0ba36942a3da5a4a055eJohn McCall /// \brief The 'unknown any' placeholder type. 530864c041e118155c2b1ce0ba36942a3da5a4a055eJohn McCall PREDEF_TYPE_UNKNOWN_ANY = 29, 531864c041e118155c2b1ce0ba36942a3da5a4a055eJohn McCall /// \brief The placeholder type for bound member functions. 532864c041e118155c2b1ce0ba36942a3da5a4a055eJohn McCall PREDEF_TYPE_BOUND_MEMBER = 30 5332cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor }; 5342cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 5352cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief The number of predefined type IDs that are reserved for 5362cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// the PREDEF_TYPE_* constants. 5372cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 5382cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// Type IDs for non-predefined types will start at 5392cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// NUM_PREDEF_TYPE_IDs. 5402cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor const unsigned NUM_PREDEF_TYPE_IDS = 100; 5412cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 542a72d8c4556fbdfca2c9e101722812861fcbdde12Douglas Gregor /// \brief The number of allowed abbreviations in bits 543a72d8c4556fbdfca2c9e101722812861fcbdde12Douglas Gregor const unsigned NUM_ALLOWED_ABBREVS_SIZE = 4; 544a72d8c4556fbdfca2c9e101722812861fcbdde12Douglas Gregor 5452cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief Record codes for each kind of type. 5462cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 54761d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// These constants describe the type records that can occur within a 548f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each 5492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// constant describes a record for a specific type class in the 5502cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// AST. 5512cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor enum TypeCode { 5522cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An ExtQualType record. 55363f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_EXT_QUAL = 1, 5542cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A ComplexType record. 55563f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_COMPLEX = 3, 5562cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A PointerType record. 55763f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_POINTER = 4, 5582cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A BlockPointerType record. 55963f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_BLOCK_POINTER = 5, 5602cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An LValueReferenceType record. 56163f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_LVALUE_REFERENCE = 6, 5622cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An RValueReferenceType record. 56363f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_RVALUE_REFERENCE = 7, 5642cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A MemberPointerType record. 56563f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_MEMBER_POINTER = 8, 5662cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A ConstantArrayType record. 56763f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_CONSTANT_ARRAY = 9, 5682cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An IncompleteArrayType record. 56963f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_INCOMPLETE_ARRAY = 10, 5702cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A VariableArrayType record. 57163f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_VARIABLE_ARRAY = 11, 5722cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A VectorType record. 57363f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_VECTOR = 12, 5742cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An ExtVectorType record. 57563f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_EXT_VECTOR = 13, 5762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A FunctionNoProtoType record. 57763f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_FUNCTION_NO_PROTO = 14, 5782cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A FunctionProtoType record. 57963f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_FUNCTION_PROTO = 15, 5802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A TypedefType record. 58163f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_TYPEDEF = 16, 5822cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A TypeOfExprType record. 58363f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_TYPEOF_EXPR = 17, 5842cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A TypeOfType record. 58563f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_TYPEOF = 18, 5862cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A RecordType record. 58763f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_RECORD = 19, 5882cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An EnumType record. 58963f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_ENUM = 20, 5902cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief An ObjCInterfaceType record. 59163f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor TYPE_OBJC_INTERFACE = 21, 592d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff /// \brief An ObjCObjectPointerType record. 593c15cb2af27514ecc879daba9aa01389c5203685dSteve Naroff TYPE_OBJC_OBJECT_POINTER = 22, 594395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson /// \brief a DecltypeType record. 59554e14c4db764c0636160d26c5bbf491637c83a76John McCall TYPE_DECLTYPE = 23, 5967da2431c23ef1ee8acb114e39692246e1801afc2John McCall /// \brief An ElaboratedType record. 59754e14c4db764c0636160d26c5bbf491637c83a76John McCall TYPE_ELABORATED = 24, 59849a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall /// \brief A SubstTemplateTypeParmType record. 599ed97649e9574b9d854fa4d6109c9333ae0993554John McCall TYPE_SUBST_TEMPLATE_TYPE_PARM = 25, 600ed97649e9574b9d854fa4d6109c9333ae0993554John McCall /// \brief An UnresolvedUsingType record. 6013cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4John McCall TYPE_UNRESOLVED_USING = 26, 6023cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4John McCall /// \brief An InjectedClassNameType record. 603c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44eJohn McCall TYPE_INJECTED_CLASS_NAME = 27, 604c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44eJohn McCall /// \brief An ObjCObjectType record. 60590b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis TYPE_OBJC_OBJECT = 28, 60690b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis /// \brief An TemplateTypeParmType record. 60790b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis TYPE_TEMPLATE_TYPE_PARM = 29, 60890b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis /// \brief An TemplateSpecializationType record. 6098dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfeArgyrios Kyrtzidis TYPE_TEMPLATE_SPECIALIZATION = 30, 6103acad62a239448bef0f5848b2a0d5f7dfefd3d14Argyrios Kyrtzidis /// \brief A DependentNameType record. 6113acad62a239448bef0f5848b2a0d5f7dfefd3d14Argyrios Kyrtzidis TYPE_DEPENDENT_NAME = 31, 6123acad62a239448bef0f5848b2a0d5f7dfefd3d14Argyrios Kyrtzidis /// \brief A DependentTemplateSpecializationType record. 613ae8b17f1d5d303af53db5a4f4a375ea6b9356566Argyrios Kyrtzidis TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32, 614ae8b17f1d5d303af53db5a4f4a375ea6b9356566Argyrios Kyrtzidis /// \brief A DependentSizedArrayType record. 615075f8f1b6bed4d1b224c74f87508534cc6392ce6Abramo Bagnara TYPE_DEPENDENT_SIZED_ARRAY = 33, 616075f8f1b6bed4d1b224c74f87508534cc6392ce6Abramo Bagnara /// \brief A ParenType record. 6177536dd5e6c99584481b7dab68b7e7d8df9c54054Douglas Gregor TYPE_PAREN = 34, 6187536dd5e6c99584481b7dab68b7e7d8df9c54054Douglas Gregor /// \brief A PackExpansionType record. 6199d156a7b1b2771e191f2f5a45a7b7a694129463bJohn McCall TYPE_PACK_EXPANSION = 35, 6209d156a7b1b2771e191f2f5a45a7b7a694129463bJohn McCall /// \brief An AttributedType record. 621c3069d618f4661d923cb1b5c4525b082fce73b04Douglas Gregor TYPE_ATTRIBUTED = 36, 622c3069d618f4661d923cb1b5c4525b082fce73b04Douglas Gregor /// \brief A SubstTemplateTypeParmPackType record. 62334b41d939a1328f484511c6002ba2456db879a29Richard Smith TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37, 62434b41d939a1328f484511c6002ba2456db879a29Richard Smith /// \brief A AutoType record. 625ca63c200346c0ca9e00194ec6e34a5a7b0ed9321Sean Hunt TYPE_AUTO = 38, 626ca63c200346c0ca9e00194ec6e34a5a7b0ed9321Sean Hunt /// \brief A UnaryTransformType record. 627ca63c200346c0ca9e00194ec6e34a5a7b0ed9321Sean Hunt TYPE_UNARY_TRANSFORM = 39 6282cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor }; 6292cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 630ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// \brief The type IDs for special types constructed by semantic 631ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// analysis. 632ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// 633ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// The constants in this enumeration are indices into the 634ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// SPECIAL_TYPES record. 635ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor enum SpecialTypeIDs { 636ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor /// \brief __builtin_va_list 637319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor SPECIAL_TYPE_BUILTIN_VA_LIST = 0, 638319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor /// \brief Objective-C "id" type 639319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor SPECIAL_TYPE_OBJC_ID = 1, 640319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor /// \brief Objective-C selector type 641319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor SPECIAL_TYPE_OBJC_SELECTOR = 2, 642319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor /// \brief Objective-C Protocol type 643319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor SPECIAL_TYPE_OBJC_PROTOCOL = 3, 644319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor /// \brief Objective-C Class type 645319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor SPECIAL_TYPE_OBJC_CLASS = 4, 646319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor /// \brief CFConstantString type 647319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor SPECIAL_TYPE_CF_CONSTANT_STRING = 5, 648319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor /// \brief Objective-C fast enumeration state type 649c29f77b769bcc5b6dc85e72c8e3cc2e348e5cf25Douglas Gregor SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE = 6, 650c29f77b769bcc5b6dc85e72c8e3cc2e348e5cf25Douglas Gregor /// \brief C FILE typedef type 651782fa308a765aeac2acb39c4e697c937ec21185bMike Stump SPECIAL_TYPE_FILE = 7, 652782fa308a765aeac2acb39c4e697c937ec21185bMike Stump /// \brief C jmp_buf typedef type 653782fa308a765aeac2acb39c4e697c937ec21185bMike Stump SPECIAL_TYPE_jmp_buf = 8, 654782fa308a765aeac2acb39c4e697c937ec21185bMike Stump /// \brief C sigjmp_buf typedef type 655d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor SPECIAL_TYPE_sigjmp_buf = 9, 656d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor /// \brief Objective-C "id" redefinition type 657d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10, 658d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor /// \brief Objective-C "Class" redefinition type 659adaaad3715c9c26cdcfdfe3401a13d7b4423ddcfMike Stump SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11, 660adaaad3715c9c26cdcfdfe3401a13d7b4423ddcfMike Stump /// \brief Block descriptor type for Blocks CodeGen 661083c25eea14bb4cc4ecc3ec763c60e2e609e22bdMike Stump SPECIAL_TYPE_BLOCK_DESCRIPTOR = 12, 662083c25eea14bb4cc4ecc3ec763c60e2e609e22bdMike Stump /// \brief Block extedned descriptor type for Blocks CodeGen 66313dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR = 13, 66413dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian /// \brief Objective-C "SEL" redefinition type 6652bb5ddaff86ee73d2cea7ec1835978afc88a83f0Fariborz Jahanian SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 14, 6662bb5ddaff86ee73d2cea7ec1835978afc88a83f0Fariborz Jahanian /// \brief NSConstantString type 667006113841bdae1edb77aef75ba1ffdf2e55a3094Argyrios Kyrtzidis SPECIAL_TYPE_NS_CONSTANT_STRING = 15, 668006113841bdae1edb77aef75ba1ffdf2e55a3094Argyrios Kyrtzidis /// \brief Whether __[u]int128_t identifier is installed. 669ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith SPECIAL_TYPE_INT128_INSTALLED = 16, 670ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith /// \brief Cached "auto" deduction type. 671ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith SPECIAL_TYPE_AUTO_DEDUCT = 17, 672ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith /// \brief Cached "auto &&" deduction type. 673ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith SPECIAL_TYPE_AUTO_RREF_DEDUCT = 18 674ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor }; 675ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor 6762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief Record codes for each kind of declaration. 6772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 67861d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// These constants describe the declaration records that can occur within 67961d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// a declarations block (identified by DECLS_BLOCK_ID). Each 6802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// constant describes a record for a specific declaration class 6812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// in the AST. 6822cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor enum DeclCode { 6832cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A TranslationUnitDecl record. 6844eb9fc0449ddbd5239ddc3ae6b6e52880f47dcf7Argyrios Kyrtzidis DECL_TRANSLATION_UNIT = 50, 6852cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A TypedefDecl record. 6862cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor DECL_TYPEDEF, 687162e1c1b487352434552147967c3dd296ebee2f7Richard Smith /// \brief A TypeAliasDecl record. 688162e1c1b487352434552147967c3dd296ebee2f7Richard Smith DECL_TYPEALIAS, 6890a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor /// \brief An EnumDecl record. 6900a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor DECL_ENUM, 6918c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor /// \brief A RecordDecl record. 6928c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor DECL_RECORD, 6930a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor /// \brief An EnumConstantDecl record. 6940a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor DECL_ENUM_CONSTANT, 6953a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor /// \brief A FunctionDecl record. 6963a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor DECL_FUNCTION, 69753c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eecSteve Naroff /// \brief A ObjCMethodDecl record. 69853c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eecSteve Naroff DECL_OBJC_METHOD, 69933feeb019a5742b286eededd5446ec0fe87c5a61Steve Naroff /// \brief A ObjCInterfaceDecl record. 70030833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_INTERFACE, 70130833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCProtocolDecl record. 70230833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_PROTOCOL, 70333feeb019a5742b286eededd5446ec0fe87c5a61Steve Naroff /// \brief A ObjCIvarDecl record. 70430833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_IVAR, 70530833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCAtDefsFieldDecl record. 70630833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_AT_DEFS_FIELD, 70730833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCClassDecl record. 70830833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_CLASS, 70930833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCForwardProtocolDecl record. 71030833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_FORWARD_PROTOCOL, 71130833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCCategoryDecl record. 71230833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_CATEGORY, 71330833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCCategoryImplDecl record. 71430833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_CATEGORY_IMPL, 71530833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCImplementationDecl record. 71630833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_IMPLEMENTATION, 71730833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCCompatibleAliasDecl record. 71830833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_COMPATIBLE_ALIAS, 71930833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCPropertyDecl record. 72030833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_PROPERTY, 72130833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff /// \brief A ObjCPropertyImplDecl record. 72230833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff DECL_OBJC_PROPERTY_IMPL, 7238c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor /// \brief A FieldDecl record. 7248c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor DECL_FIELD, 7252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A VarDecl record. 7262cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor DECL_VAR, 727405bad07391494d2eb025f8222c256c66b56e5f8Douglas Gregor /// \brief An ImplicitParamDecl record. 728405bad07391494d2eb025f8222c256c66b56e5f8Douglas Gregor DECL_IMPLICIT_PARAM, 7293a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor /// \brief A ParmVarDecl record. 7303a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor DECL_PARM_VAR, 7311028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor /// \brief A FileScopeAsmDecl record. 7321028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor DECL_FILE_SCOPE_ASM, 7331028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor /// \brief A BlockDecl record. 7341028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor DECL_BLOCK, 7352cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A record that stores the set of declarations that are 7362cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// lexically stored within a given DeclContext. 7372cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 738681d7237e1014bf64dd5ead6bf74ae55cdd19e61Sebastian Redl /// The record itself is a blob that is an array of declaration IDs, 739681d7237e1014bf64dd5ead6bf74ae55cdd19e61Sebastian Redl /// in the order in which those declarations were added to the 7402cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// declaration context. This data is used when iterating over 7412cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// the contents of a DeclContext, e.g., via 7422cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// DeclContext::decls_begin()/DeclContext::decls_end(). 7432cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor DECL_CONTEXT_LEXICAL, 7442cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// \brief A record that stores the set of declarations that are 7452cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// visible from a given DeclContext. 7462cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// 7472cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// The record itself stores a set of mappings, each of which 7482cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// associates a declaration name with one or more declaration 7492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// IDs. This data is used when performing qualified name lookup 7502cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor /// into a DeclContext via DeclContext::lookup. 7510cef483f3b9d6a7f9fdbc5910d0a3ed64130e8e1Douglas Gregor DECL_CONTEXT_VISIBLE, 752ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298Chris Lattner /// \brief A LabelDecl record. 753ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298Chris Lattner DECL_LABEL, 754ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298Chris Lattner /// \brief A NamespaceDecl record. 7556ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_NAMESPACE, 7566ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A NamespaceAliasDecl record. 7576ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_NAMESPACE_ALIAS, 7586ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A UsingDecl record. 7596ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_USING, 7606ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A UsingShadowDecl record. 7616ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_USING_SHADOW, 7626ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A UsingDirecitveDecl record. 7636ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_USING_DIRECTIVE, 7646ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief An UnresolvedUsingValueDecl record. 7656ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_UNRESOLVED_USING_VALUE, 7666ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief An UnresolvedUsingTypenameDecl record. 7676ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_UNRESOLVED_USING_TYPENAME, 7686ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A LinkageSpecDecl record. 7696ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_LINKAGE_SPEC, 7706ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A CXXRecordDecl record. 7716ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CXX_RECORD, 7726ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A CXXMethodDecl record. 7736ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CXX_METHOD, 7746ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A CXXConstructorDecl record. 7756ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CXX_CONSTRUCTOR, 7766ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A CXXDestructorDecl record. 7776ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CXX_DESTRUCTOR, 7786ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner /// \brief A CXXConversionDecl record. 7796ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CXX_CONVERSION, 7806206d53f67613958ae1b023aba337ebb46f11a8bAbramo Bagnara /// \brief An AccessSpecDecl record. 7816206d53f67613958ae1b023aba337ebb46f11a8bAbramo Bagnara DECL_ACCESS_SPEC, 7826ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner 7835f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A FriendDecl record. 7846ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_FRIEND, 7855f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A FriendTemplateDecl record. 7866ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_FRIEND_TEMPLATE, 7875f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A ClassTemplateDecl record. 7886ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CLASS_TEMPLATE, 7895f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A ClassTemplateSpecializationDecl record. 7906ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CLASS_TEMPLATE_SPECIALIZATION, 7915f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A ClassTemplatePartialSpecializationDecl record. 7926ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION, 7935f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A FunctionTemplateDecl record. 7946ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_FUNCTION_TEMPLATE, 7955f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A TemplateTypeParmDecl record. 7966ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_TEMPLATE_TYPE_PARM, 7975f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A NonTypeTemplateParmDecl record. 7986ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_NON_TYPE_TEMPLATE_PARM, 7995f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A TemplateTemplateParmDecl record. 8006ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner DECL_TEMPLATE_TEMPLATE_PARM, 8013e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith /// \brief A TypeAliasTemplateDecl record. 8023e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith DECL_TYPE_ALIAS_TEMPLATE, 8035f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis /// \brief A StaticAssertDecl record. 8047c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor DECL_STATIC_ASSERT, 8057c789c1a3f77f24032aa0bed2afacdb9e094e952Douglas Gregor /// \brief A record containing CXXBaseSpecifiers. 80687c2e121cf0522fc266efe2922b58091cd2e0182Francois Pichet DECL_CXX_BASE_SPECIFIERS, 80787c2e121cf0522fc266efe2922b58091cd2e0182Francois Pichet /// \brief A IndirectFieldDecl record. 8086952f1e4256c5b43aee5e98cea4e9b663bd1d413Douglas Gregor DECL_INDIRECTFIELD, 8096952f1e4256c5b43aee5e98cea4e9b663bd1d413Douglas Gregor /// \brief A NonTypeTemplateParmDecl record that stores an expanded 8106952f1e4256c5b43aee5e98cea4e9b663bd1d413Douglas Gregor /// non-type template parameter pack. 8116952f1e4256c5b43aee5e98cea4e9b663bd1d413Douglas Gregor DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK 8122cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor }; 8130b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor 8140b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// \brief Record codes for each kind of statement or expression. 8150b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// 8160b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// These constants describe the records that describe statements 81761d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// or expressions. These records occur within type and declarations 81861d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// block, so they begin with record values of 100. Each constant 81961d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// describes a record for a specific statement or expression class in the 82061d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor /// AST. 8210b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor enum StmtCode { 822087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor /// \brief A marker record that indicates that we are at the end 823087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor /// of an expression. 82461d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor STMT_STOP = 100, 8250b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// \brief A NULL expression. 826c9490c000f515c29f200a1215328d8ab9a0f3818Douglas Gregor STMT_NULL_PTR, 827025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief A NullStmt record. 828025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_NULL, 829025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief A CompoundStmt record. 830025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_COMPOUND, 831025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief A CaseStmt record. 832025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_CASE, 833025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief A DefaultStmt record. 834025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_DEFAULT, 8351de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor /// \brief A LabelStmt record. 8361de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor STMT_LABEL, 837025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief An IfStmt record. 838025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_IF, 839025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief A SwitchStmt record. 840025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_SWITCH, 841d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor /// \brief A WhileStmt record. 842d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor STMT_WHILE, 84367d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor /// \brief A DoStmt record. 84467d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor STMT_DO, 84567d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor /// \brief A ForStmt record. 84667d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor STMT_FOR, 8471de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor /// \brief A GotoStmt record. 8481de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor STMT_GOTO, 8497d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41fDouglas Gregor /// \brief An IndirectGotoStmt record. 8507d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41fDouglas Gregor STMT_INDIRECT_GOTO, 851d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor /// \brief A ContinueStmt record. 852d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor STMT_CONTINUE, 853025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor /// \brief A BreakStmt record. 854025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor STMT_BREAK, 8550de9d8857b715c2f45c987651f4ce06d73330d93Douglas Gregor /// \brief A ReturnStmt record. 8560de9d8857b715c2f45c987651f4ce06d73330d93Douglas Gregor STMT_RETURN, 85784f2170062014d268951902164bed0d8bdea0e82Douglas Gregor /// \brief A DeclStmt record. 85884f2170062014d268951902164bed0d8bdea0e82Douglas Gregor STMT_DECL, 859cd7d5a9dc558178ed7a66032f888781b3c592e4fDouglas Gregor /// \brief An AsmStmt record. 860cd7d5a9dc558178ed7a66032f888781b3c592e4fDouglas Gregor STMT_ASM, 86117fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor /// \brief A PredefinedExpr record. 86217fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor EXPR_PREDEFINED, 8630b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// \brief A DeclRefExpr record. 8640b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor EXPR_DECL_REF, 8650b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// \brief An IntegerLiteral record. 8660b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor EXPR_INTEGER_LITERAL, 86717fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor /// \brief A FloatingLiteral record. 86817fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor EXPR_FLOATING_LITERAL, 869cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor /// \brief An ImaginaryLiteral record. 870cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor EXPR_IMAGINARY_LITERAL, 871673ecd6a4a9f7c12fb6f76f84f654dbdcdc89e76Douglas Gregor /// \brief A StringLiteral record. 872673ecd6a4a9f7c12fb6f76f84f654dbdcdc89e76Douglas Gregor EXPR_STRING_LITERAL, 8730b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor /// \brief A CharacterLiteral record. 874087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor EXPR_CHARACTER_LITERAL, 875c04db4feefa2b0dbbc6876cb4eeeee108aa6791dDouglas Gregor /// \brief A ParenExpr record. 876c04db4feefa2b0dbbc6876cb4eeeee108aa6791dDouglas Gregor EXPR_PAREN, 87737bdfe284ad365f753741d1d89c078c148b3f4afArgyrios Kyrtzidis /// \brief A ParenListExpr record. 87837bdfe284ad365f753741d1d89c078c148b3f4afArgyrios Kyrtzidis EXPR_PAREN_LIST, 8790b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor /// \brief A UnaryOperator record. 8800b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor EXPR_UNARY_OPERATOR, 8818ecdb65716cd7914ffb2eeee993fa9039fcd31e8Douglas Gregor /// \brief An OffsetOfExpr record. 8828ecdb65716cd7914ffb2eeee993fa9039fcd31e8Douglas Gregor EXPR_OFFSETOF, 8830b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor /// \brief A SizefAlignOfExpr record. 8840b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor EXPR_SIZEOF_ALIGN_OF, 885cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor /// \brief An ArraySubscriptExpr record. 886cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor EXPR_ARRAY_SUBSCRIPT, 8871f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor /// \brief A CallExpr record. 8881f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor EXPR_CALL, 8891f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor /// \brief A MemberExpr record. 8901f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor EXPR_MEMBER, 891db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor /// \brief A BinaryOperator record. 892db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor EXPR_BINARY_OPERATOR, 893ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor /// \brief A CompoundAssignOperator record. 894ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor EXPR_COMPOUND_ASSIGN_OPERATOR, 895ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor /// \brief A ConditionOperator record. 896ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor EXPR_CONDITIONAL_OPERATOR, 897087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor /// \brief An ImplicitCastExpr record. 898db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor EXPR_IMPLICIT_CAST, 899db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor /// \brief A CStyleCastExpr record. 900d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor EXPR_CSTYLE_CAST, 901ba6d7e7fa5f79959d3eef39adb5620d845ba5198Douglas Gregor /// \brief A CompoundLiteralExpr record. 902ba6d7e7fa5f79959d3eef39adb5620d845ba5198Douglas Gregor EXPR_COMPOUND_LITERAL, 903d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor /// \brief An ExtVectorElementExpr record. 904d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor EXPR_EXT_VECTOR_ELEMENT, 905d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief An InitListExpr record. 906d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor EXPR_INIT_LIST, 907d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief A DesignatedInitExpr record. 908d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor EXPR_DESIGNATED_INIT, 909d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief An ImplicitValueInitExpr record. 910d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor EXPR_IMPLICIT_VALUE_INIT, 911d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor /// \brief A VAArgExpr record. 91244cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor EXPR_VA_ARG, 9136a2dd55b0b3ae376d449a4b07bbb6b2d30b26330Douglas Gregor /// \brief An AddrLabelExpr record. 9147d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41fDouglas Gregor EXPR_ADDR_LABEL, 9156a2dd55b0b3ae376d449a4b07bbb6b2d30b26330Douglas Gregor /// \brief A StmtExpr record. 9166a2dd55b0b3ae376d449a4b07bbb6b2d30b26330Douglas Gregor EXPR_STMT, 91744cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor /// \brief A ChooseExpr record. 91844cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor EXPR_CHOOSE, 91944cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor /// \brief A GNUNullExpr record. 92094cd5d1397bb1a8bcd109602aa38dd787b164c22Douglas Gregor EXPR_GNU_NULL, 92194cd5d1397bb1a8bcd109602aa38dd787b164c22Douglas Gregor /// \brief A ShuffleVectorExpr record. 92294cd5d1397bb1a8bcd109602aa38dd787b164c22Douglas Gregor EXPR_SHUFFLE_VECTOR, 92384af7c27cdc615ff917a501d61256b4049383c97Douglas Gregor /// \brief BlockExpr 92484af7c27cdc615ff917a501d61256b4049383c97Douglas Gregor EXPR_BLOCK, 92584af7c27cdc615ff917a501d61256b4049383c97Douglas Gregor /// \brief A BlockDeclRef record. 9264dcf151a555ff51e4d643e8e6eeb80f121d11d1bChris Lattner EXPR_BLOCK_DECL_REF, 927f111d935722ed488144600cea5ed03a6b5069e8fPeter Collingbourne /// \brief A GenericSelectionExpr record. 928f111d935722ed488144600cea5ed03a6b5069e8fPeter Collingbourne EXPR_GENERIC_SELECTION, 92939da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor 9304dcf151a555ff51e4d643e8e6eeb80f121d11d1bChris Lattner // Objective-C 9311eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 9320389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCStringLiteral record. 9333a57a3765b6192a94ff4e5997ae0489a1471b308Chris Lattner EXPR_OBJC_STRING_LITERAL, 9340389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCEncodeExpr record. 9353a57a3765b6192a94ff4e5997ae0489a1471b308Chris Lattner EXPR_OBJC_ENCODE, 9360389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCSelectorExpr record. 9373a57a3765b6192a94ff4e5997ae0489a1471b308Chris Lattner EXPR_OBJC_SELECTOR_EXPR, 9380389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCProtocolExpr record. 939c4f0bbdb166fbc31ab2cf0f6ff573fde9fa307b3Steve Naroff EXPR_OBJC_PROTOCOL_EXPR, 9400389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCIvarRefExpr record. 9410389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner EXPR_OBJC_IVAR_REF_EXPR, 9420389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCPropertyRefExpr record. 9430389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner EXPR_OBJC_PROPERTY_REF_EXPR, 94412f78a6741a4cb3d904340f8d3d2714568b50e7aJohn McCall /// \brief UNUSED 9450389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner EXPR_OBJC_KVC_REF_EXPR, 9460389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner /// \brief An ObjCMessageExpr record. 9470389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner EXPR_OBJC_MESSAGE_EXPR, 948f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3Steve Naroff /// \brief An ObjCIsa Expr record. 949f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3Steve Naroff EXPR_OBJC_ISA, 950f85e193739c953358c865005855253af4f68a497John McCall /// \breif An ObjCIndirectCopyRestoreExpr record. 951f85e193739c953358c865005855253af4f68a497John McCall EXPR_OBJC_INDIRECT_COPY_RESTORE, 9521eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump 9531eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump /// \brief An ObjCForCollectionStmt record. 9541eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff STMT_OBJC_FOR_COLLECTION, 9551eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump /// \brief An ObjCAtCatchStmt record. 9561eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff STMT_OBJC_CATCH, 9571eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump /// \brief An ObjCAtFinallyStmt record. 9581eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff STMT_OBJC_FINALLY, 9591eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump /// \brief An ObjCAtTryStmt record. 9601eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff STMT_OBJC_AT_TRY, 9611eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump /// \brief An ObjCAtSynchronizedStmt record. 9621eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff STMT_OBJC_AT_SYNCHRONIZED, 9631eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump /// \brief An ObjCAtThrowStmt record. 964ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis STMT_OBJC_AT_THROW, 965f85e193739c953358c865005855253af4f68a497John McCall /// \brief An ObjCAutoreleasePoolStmt record. 966f85e193739c953358c865005855253af4f68a497John McCall STMT_OBJC_AUTORELEASE_POOL, 967ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis 968ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis // C++ 9697cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis 9707cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis /// \brief A CXXCatchStmt record. 9717cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis STMT_CXX_CATCH, 9727cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis /// \brief A CXXTryStmt record. 9737cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis STMT_CXX_TRY, 974ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith /// \brief A CXXForRangeStmt record. 975ad762fcdc16b9e4705b12b09d92b8c026212b906Richard Smith STMT_CXX_FOR_RANGE, 976ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis 97739da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor /// \brief A CXXOperatorCallExpr record. 97839da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor EXPR_CXX_OPERATOR_CALL, 9791817bd483b538fd3f4530649f5cb900bad9e8a76Chris Lattner /// \brief A CXXMemberCallExpr record. 9801817bd483b538fd3f4530649f5cb900bad9e8a76Chris Lattner EXPR_CXX_MEMBER_CALL, 98139da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor /// \brief A CXXConstructExpr record. 982ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig EXPR_CXX_CONSTRUCT, 9836d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis /// \brief A CXXTemporaryObjectExpr record. 9846d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis EXPR_CXX_TEMPORARY_OBJECT, 985f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief A CXXStaticCastExpr record. 986ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig EXPR_CXX_STATIC_CAST, 987f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief A CXXDynamicCastExpr record. 988ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig EXPR_CXX_DYNAMIC_CAST, 989f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief A CXXReinterpretCastExpr record. 990ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig EXPR_CXX_REINTERPRET_CAST, 991f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief A CXXConstCastExpr record. 992ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig EXPR_CXX_CONST_CAST, 993f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief A CXXFunctionalCastExpr record. 994eb7f96141f754150a92433286fa385910a22f494Sam Weinig EXPR_CXX_FUNCTIONAL_CAST, 995f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl /// \brief A CXXBoolLiteralExpr record. 996eb7f96141f754150a92433286fa385910a22f494Sam Weinig EXPR_CXX_BOOL_LITERAL, 99714ab24f01e36d495fce183aa67b41e45cdd54f39Chris Lattner EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr 99814ab24f01e36d495fce183aa67b41e45cdd54f39Chris Lattner EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr). 9992fbdfcdf3bbf7b941853d38b123930755e837437Chris Lattner EXPR_CXX_TYPEID_TYPE, // CXXTypeidExpr (of type). 10002fbdfcdf3bbf7b941853d38b123930755e837437Chris Lattner EXPR_CXX_THIS, // CXXThisExpr 1001030854b95f7bfd86aaa8afd9ae1aff9768a37e9aChris Lattner EXPR_CXX_THROW, // CXXThrowExpr 1002d2598368876cfe40bc8465540033bc5b5e58d8afChris Lattner EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr 1003d2598368876cfe40bc8465540033bc5b5e58d8afChris Lattner EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr 10046d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis 1005ed8abf18329df67b0abcbb3a10458bd8c1d2a595Douglas Gregor EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr 10065921863d8f24084797863b5df37842113bac4352Chris Lattner EXPR_CXX_NEW, // CXXNewExpr 100795fc98ce95d4faa4f1bb2783384150530404ea6fArgyrios Kyrtzidis EXPR_CXX_DELETE, // CXXDeleteExpr 1008de4bd18bb45a1db68996cfb949db3015fc25d10dArgyrios Kyrtzidis EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr 1009d2598368876cfe40bc8465540033bc5b5e58d8afChris Lattner 10104765fa05b5652fcc4356371c2f481d0ea9a1b007John McCall EXPR_EXPR_WITH_CLEANUPS, // ExprWithCleanups 10118dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfeArgyrios Kyrtzidis 10126b219d082434394c1ac401390ec1d1967727815aSebastian Redl EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr 10136b219d082434394c1ac401390ec1d1967727815aSebastian Redl EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr 10146b219d082434394c1ac401390ec1d1967727815aSebastian Redl EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr 10156b219d082434394c1ac401390ec1d1967727815aSebastian Redl EXPR_CXX_UNRESOLVED_MEMBER, // UnresolvedMemberExpr 10166b219d082434394c1ac401390ec1d1967727815aSebastian Redl EXPR_CXX_UNRESOLVED_LOOKUP, // UnresolvedLookupExpr 10176b219d082434394c1ac401390ec1d1967727815aSebastian Redl 10186b219d082434394c1ac401390ec1d1967727815aSebastian Redl EXPR_CXX_UNARY_TYPE_TRAIT, // UnaryTypeTraitExpr 1019552622067dc45013d240f73952fece703f5e63bdJohn Wiegley EXPR_CXX_EXPRESSION_TRAIT, // ExpressionTraitExpr 10207cd7d1ad33fdf49eef83942e8855fe20d95aa1b9John McCall EXPR_CXX_NOEXCEPT, // CXXNoexceptExpr 10217cd7d1ad33fdf49eef83942e8855fe20d95aa1b9John McCall 10226ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet EXPR_OPAQUE_VALUE, // OpaqueValueExpr 102356ca35d396d8692c384c785f9aeebcf22563fe1eJohn McCall EXPR_BINARY_CONDITIONAL_OPERATOR, // BinaryConditionalOperator 1024be230c36e32142cbdcdbe9c97511d097beeecbabDouglas Gregor EXPR_BINARY_TYPE_TRAIT, // BinaryTypeTraitExpr 102521ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley EXPR_ARRAY_TYPE_TRAIT, // ArrayTypeTraitIntExpr 1026be230c36e32142cbdcdbe9c97511d097beeecbabDouglas Gregor 1027ee8aff06f6a96214731de17b2cb6df407c6c1820Douglas Gregor EXPR_PACK_EXPANSION, // PackExpansionExpr 1028c7793c73ba8a343de3f2552d984851985a46f159Douglas Gregor EXPR_SIZEOF_PACK, // SizeOfPackExpr 10297110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, // SubstNonTypeTemplateParmExpr 1030e08ce650a2b02410eddd1f60a4aa6b3d4be71e73Peter Collingbourne EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr 103103e80030515c800d1ab44125b9052dfffd1bd04cDouglas Gregor EXPR_MATERIALIZE_TEMPORARY, // MaterializeTemporaryExpr 103203e80030515c800d1ab44125b9052dfffd1bd04cDouglas Gregor 1033e08ce650a2b02410eddd1f60a4aa6b3d4be71e73Peter Collingbourne // CUDA 1034f85e193739c953358c865005855253af4f68a497John McCall EXPR_CUDA_KERNEL_CALL, // CUDAKernelCallExpr 1035e08ce650a2b02410eddd1f60a4aa6b3d4be71e73Peter Collingbourne 103661eee0ca33b29e102f11bab77c8b74cc00e2392bTanya Lattner // OpenCL 1037f85e193739c953358c865005855253af4f68a497John McCall EXPR_ASTYPE, // AsTypeExpr 10387110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall 10397110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall // Microsoft 10407110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall EXPR_CXX_UUIDOF_EXPR, // CXXUuidofExpr (of expr). 10417110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall EXPR_CXX_UUIDOF_TYPE, // CXXUuidofExpr (of type). 10427110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall STMT_SEH_EXCEPT, // SEHExceptStmt 10437110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall STMT_SEH_FINALLY, // SEHFinallyStmt 10447110fd6c32306b3feb97b9edb8064b1b68a54e6bJohn McCall STMT_SEH_TRY, // SEHTryStmt 1045f85e193739c953358c865005855253af4f68a497John McCall 1046f85e193739c953358c865005855253af4f68a497John McCall // ARC 1047f85e193739c953358c865005855253af4f68a497John McCall EXPR_OBJC_BRIDGED_CAST // ObjCBridgedCastExpr 10480b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor }; 1049d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor 1050d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief The kinds of designators that can occur in a 1051d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// DesignatedInitExpr. 1052d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor enum DesignatorTypes { 1053d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief Field designator where only the field name is known. 1054d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor DESIG_FIELD_NAME = 0, 1055d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief Field designator where the field has been resolved to 1056d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// a declaration. 1057d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor DESIG_FIELD_DECL = 1, 1058d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief Array designator. 1059d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor DESIG_ARRAY = 2, 1060d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor /// \brief GNU array range designator. 1061d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor DESIG_ARRAY_RANGE = 3 1062d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor }; 1063d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor 1064156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt /// \brief The different kinds of data that can occur in a 1065156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt /// CtorInitializer. 1066156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt enum CtorInitializerType { 1067156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt CTOR_INITIALIZER_BASE, 1068156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt CTOR_INITIALIZER_DELEGATING, 1069156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt CTOR_INITIALIZER_MEMBER, 1070156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt CTOR_INITIALIZER_INDIRECT_MEMBER 1071156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt }; 1072156b640c67300f2b70eb11102aa393a610798cc6Sean Hunt 107314f79002e58556798e86168c63e48d533287eda5Douglas Gregor /// @} 10742cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor } 10752cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor} // end namespace clang 10762cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor 10772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#endif 1078