ASTBitCodes.h revision 6e50e00c2fe6a04b2c35592588a4b10a2c269416
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"
229f8eb2032030482b1d3de86e9bee725d93564302Chandler Carruth#include "llvm/System/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
50f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// \brief An ID number that refers to a declaration in an AST file.
518038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    ///
52a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl    /// The ID numbers of declarations are consecutive (in order of
538038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// discovery) and start at 2. 0 is reserved for NULL, and 1 is
548038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// reserved for the translation unit declaration.
558038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    typedef uint32_t DeclID;
568038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor
57f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// \brief An ID number that refers to a type in an AST file.
588038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    ///
598038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// The ID of a type is partitioned into two parts: the lower
608038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// three bits are used to store the const/volatile/restrict
618038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// qualifiers (as with QualType) and the upper bits provide a
628038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// type index. The type index values are partitioned into two
638038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
648038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
658038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
668038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    /// other types that have serialized representations.
678038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    typedef uint32_t TypeID;
682cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
69c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis    /// \brief A type index; the type ID with the qualifier bits removed.
70c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis    class TypeIdx {
71c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      uint32_t Idx;
72c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis    public:
73c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      TypeIdx() : Idx(0) { }
74c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      explicit TypeIdx(uint32_t index) : Idx(index) { }
75c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis
76c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      uint32_t getIndex() const { return Idx; }
77c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      TypeID asTypeID(unsigned FastQuals) const {
78c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis        return (Idx << Qualifiers::FastWidth) | FastQuals;
79c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      }
80c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      static TypeIdx fromTypeID(TypeID ID) {
81c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis        return TypeIdx(ID >> Qualifiers::FastWidth);
82c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis      }
83c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis    };
84c8e5d51f51e46c6f7717761537c6609ef9daf57cArgyrios Kyrtzidis
855d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// A structure for putting "fast"-unqualified QualTypes into a
865d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// DenseMap.  This uses the standard pointer hash function.
875d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    struct UnsafeQualTypeDenseMapInfo {
885d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      static inline bool isEqual(QualType A, QualType B) { return A == B; }
895d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      static inline QualType getEmptyKey() {
905d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis        return QualType::getFromOpaquePtr((void*) 1);
915d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      }
925d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      static inline QualType getTombstoneKey() {
935d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis        return QualType::getFromOpaquePtr((void*) 2);
945d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      }
955d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      static inline unsigned getHashValue(QualType T) {
965d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis        assert(!T.getLocalFastQualifiers() &&
975d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis               "hash invalid for types with fast quals");
985d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis        uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
995d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis        return (unsigned(v) >> 4) ^ (unsigned(v) >> 9);
1005d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis      }
1015d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    };
1025d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis
1035d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// \brief Map that provides the ID numbers of each type within the
1045d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// output stream, plus those deserialized from a chained PCH.
1055d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    ///
1065d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// The ID numbers of types are consecutive (in order of discovery)
1075d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// and start at 1. 0 is reserved for NULL. When types are actually
1085d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// stored in the stream, the ID number is shifted by 2 bits to
1095d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// allow for the const/volatile qualifiers.
1105d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    ///
1115d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    /// Keys in the map never have const/volatile qualifiers.
1125d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis    typedef llvm::DenseMap<QualType, TypeIdx, UnsafeQualTypeDenseMapInfo>
1135d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis        TypeIdxMap;
1145d26768e2661faa7ce0b55ffff4be8b3969fbbf5Argyrios Kyrtzidis
115f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// \brief An ID number that refers to an identifier in an AST
116afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor    /// file.
117afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor    typedef uint32_t IdentID;
118afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor
11990cd1bb1baac2a0221f3642de0cbea3244b116e5Steve Naroff    typedef uint32_t SelectorID;
1201eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
1212cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// \brief Describes the various kinds of blocks that occur within
122f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// an AST file.
1232cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    enum BlockIDs {
124f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief The AST block, which acts as a container around the
125f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// full AST block.
126f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
12714f79002e58556798e86168c63e48d533287eda5Douglas Gregor
12814f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// \brief The block containing information about the source
12914f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// manager.
13014f79002e58556798e86168c63e48d533287eda5Douglas Gregor      SOURCE_MANAGER_BLOCK_ID,
13114f79002e58556798e86168c63e48d533287eda5Douglas Gregor
13214f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// \brief The block containing information about the
13314f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// preprocessor.
13414f79002e58556798e86168c63e48d533287eda5Douglas Gregor      PREPROCESSOR_BLOCK_ID,
13514f79002e58556798e86168c63e48d533287eda5Douglas Gregor
1362cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The block containing the definitions of all of the
137f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// types and decls used within the AST file.
13861d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      DECLTYPES_BLOCK_ID
1398038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor    };
1402cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
141f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// \brief Record types that occur within the AST block itself.
142f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    enum ASTRecordTypes {
14361d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// \brief Record code for the offsets of each type.
1442cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      ///
1458038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// The TYPE_OFFSET constant describes the record that occurs
146f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// within the AST block. The record itself is an array of offsets that
14761d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// point into the declarations and types block (identified by
14861d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
1498038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// of a type. For a given type ID @c T, the lower three bits of
1508038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// @c T are its qualifiers (const, volatile, restrict), as in
1518038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// the QualType class. The upper bits, after being shifted and
1528038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
1538038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// TYPE_OFFSET block to determine the offset of that type's
15461d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// corresponding record within the DECLTYPES_BLOCK_ID block.
1558038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      TYPE_OFFSET = 1,
1561eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
1578038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// \brief Record code for the offsets of each decl.
1588038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      ///
1598038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// The DECL_OFFSET constant describes the record that occurs
16061d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// within the block identified by DECL_OFFSETS_BLOCK_ID within
161f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// the AST block. The record itself is an array of offsets that
16261d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// point into the declarations and types block (identified by
16361d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
1648038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// record, after subtracting one to account for the use of
1658038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// declaration ID 0 for a NULL declaration pointer. Index 0 is
1668038d5182b72dcdef292f6fb8539ad77f338855aDouglas Gregor      /// reserved for the translation unit declaration.
1670a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      DECL_OFFSET = 2,
1680a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor
1690a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      /// \brief Record code for the language options table.
1700a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      ///
1710a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      /// The record with this code contains the contents of the
1720a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      /// LangOptions structure. We serialize the entire contents of
1730a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      /// the structure, and let the reader decide which options are
1740a0428e96c6f1e8bef7a481a9eb69a6f6df38951Douglas Gregor      /// actually important to check.
1752bec0410d268779f601bd509e0302a500af7ac6aDouglas Gregor      LANGUAGE_OPTIONS = 3,
1762bec0410d268779f601bd509e0302a500af7ac6aDouglas Gregor
177f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief AST file metadata, including the AST file version number
178f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// and the target triple used to build the AST file.
179ab41e63821dc60ad144d0684df8d79a9eef86b75Douglas Gregor      METADATA = 4,
180afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor
181afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// \brief Record code for the table of offsets of each
182afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// identifier ID.
183afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      ///
184afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// The offset table contains offsets into the blob stored in
185afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// the IDENTIFIER_TABLE record. Each offset points to the
186afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// NULL-terminated string that corresponds to that identifier.
187afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      IDENTIFIER_OFFSET = 5,
188afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor
189afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// \brief Record code for the identifier table.
190afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      ///
191afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// The identifier table is a simple blob that contains
192afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// NULL-terminated strings for all of the identifiers
193f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// referenced by the AST file. The IDENTIFIER_OFFSET table
194afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// contains the mapping from identifier IDs to the characters
195afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// in this blob. Note that the starting offsets of all of the
196afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// identifiers are odd, so that, when the identifier offset
197afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// table is loaded in, we can use the low bit to distinguish
198afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// between offsets (for unresolved identifier IDs) and
199afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// IdentifierInfo pointers (for already-resolved identifier
200afaf308b779cd8e8fc8c42601b9f383423c15c2dDouglas Gregor      /// IDs).
201fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      IDENTIFIER_TABLE = 6,
202fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor
203fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      /// \brief Record code for the array of external definitions.
204fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      ///
205f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// The AST file contains a list of all of the unnamed external
206fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      /// definitions present within the parsed headers, stored as an
207fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      /// array of declaration IDs. These external definitions will be
208f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// reported to the AST consumer after the AST file has been
209fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      /// read, since their presence can affect the semantics of the
210fdd0172ca1b3c837f8c2b37d69cc2085234e09faDouglas Gregor      /// program (e.g., for code generation).
2113e1af84bb0092a1aafb49deaa4ab6664c9a9071bDouglas Gregor      EXTERNAL_DEFINITIONS = 7,
2123e1af84bb0092a1aafb49deaa4ab6664c9a9071bDouglas Gregor
213ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// \brief Record code for the set of non-builtin, special
214ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// types.
215ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      ///
216ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// This record contains the type IDs for the various type nodes
217ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// that are constructed during semantic analysis (e.g.,
218ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
219ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// offsets into this record.
220ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      SPECIAL_TYPES = 8,
221ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor
2224c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor      /// \brief Record code for the extra statistics we gather while
223f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// generating an AST file.
2244c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor      STATISTICS = 9,
2254c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor
2264c0e86b392c5fb0cb771551fc877edb6979be69cDouglas Gregor      /// \brief Record code for the array of tentative definitions.
22714c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor      TENTATIVE_DEFINITIONS = 10,
22814c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor
22914c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor      /// \brief Record code for the array of locally-scoped external
23014c22f20c077cecd68581952a0c227f8c180be03Douglas Gregor      /// declarations.
23190cd1bb1baac2a0221f3642de0cbea3244b116e5Steve Naroff      LOCALLY_SCOPED_EXTERNAL_DECLS = 11,
2321eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
23383941df2745d69c05acee3174c7a265c206f70d9Douglas Gregor      /// \brief Record code for the table of offsets into the
23483941df2745d69c05acee3174c7a265c206f70d9Douglas Gregor      /// Objective-C method pool.
23583941df2745d69c05acee3174c7a265c206f70d9Douglas Gregor      SELECTOR_OFFSETS = 12,
236f0aaf7a59729a4ae0146e3464ee987745be95829Douglas Gregor
237f0aaf7a59729a4ae0146e3464ee987745be95829Douglas Gregor      /// \brief Record code for the Objective-C method pool,
2382eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor      METHOD_POOL = 13,
2392eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor
2402eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor      /// \brief The value of the next __COUNTER__ to dispense.
2412eafc1b56347f772729e082e6bac824b0ef1b585Douglas Gregor      /// [PP_COUNTER_VALUE, Val]
2427f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      PP_COUNTER_VALUE = 14,
2437f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor
2447f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      /// \brief Record code for the table of offsets into the block
2457f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      /// of source-location information.
2467f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      SOURCE_LOCATION_OFFSETS = 15,
2477f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor
2487f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      /// \brief Record code for the set of source location entries
249f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// that need to be preloaded by the AST reader.
2507f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      ///
2517f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      /// This set contains the source location entry for the
2527f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      /// predefines buffer and for any file entries that need to be
2537f94b0b0c6791013d2f72ced9b4bedd3b23673a6Douglas Gregor      /// preloaded.
2544fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor      SOURCE_LOCATION_PRELOADS = 16,
2554fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor
2564fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57Douglas Gregor      /// \brief Record code for the stat() cache.
257b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor      STAT_CACHE = 17,
258b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor
259b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor      /// \brief Record code for the set of ext_vector type names.
260b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor      EXT_VECTOR_DECLS = 18,
261b81c17092039f39be60e9656a37cffbdf2e2c783Douglas Gregor
262b64c19365deab788753d29c9bc881253c3f16f37Douglas Gregor      /// \brief Record code for the original file that was used to
263f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// generate the AST file.
2641cb35dd4840d21cec58648361180d5688446a9caArgyrios Kyrtzidis      ORIGINAL_FILE_NAME = 19,
2651eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
266c6fbbedb3e90ff2f04828c36fd839e01468679f5Douglas Gregor      /// Record #20 intentionally left blank.
267445e23e9b909ec8e21303c7dd82c90b72fc09ac4Douglas Gregor
2685b4ec636637c9d876102240127cc0dca9280e83aTed Kremenek      /// \brief Record code for the version control branch and revision
269f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// information of the compiler used to build this AST file.
270e6bbc01d1c4ec5241df36042e0a4a12a6711934bTanya Lattner      VERSION_CONTROL_BRANCH_REVISION = 21,
271e6bbc01d1c4ec5241df36042e0a4a12a6711934bTanya Lattner
27249b96d1a382ae9f31456166f1a734d3f7f30b992Argyrios Kyrtzidis      /// \brief Record code for the array of unused file scoped decls.
27349b96d1a382ae9f31456166f1a734d3f7f30b992Argyrios Kyrtzidis      UNUSED_FILESCOPED_DECLS = 22,
274e6bbc01d1c4ec5241df36042e0a4a12a6711934bTanya Lattner
2756a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      /// \brief Record code for the table of offsets to macro definition
2766a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      /// entries in the preprocessing record.
277d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis      MACRO_DEFINITION_OFFSETS = 23,
278d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis
279d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis      /// \brief Record code for the array of VTable uses.
280d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis      VTABLE_USES = 24,
281d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis
282d455add086f1dfa16ae87dc310e49493bbc2b0a6Argyrios Kyrtzidis      /// \brief Record code for the array of dynamic classes.
283a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl      DYNAMIC_CLASSES = 25,
284a93e3b5bde9f0a7b59215f19f176f7d69881b81cSebastian Redl
285f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief Record code for the chained AST metadata, including the
286f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// AST file version and the name of the PCH this depends on.
287320198303df7c16950d83ae79c3f702b84badcf7Fariborz Jahanian      CHAINED_METADATA = 26,
288d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl
289681d7237e1014bf64dd5ead6bf74ae55cdd19e61Sebastian Redl      /// \brief Record code for referenced selector pool.
290d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl      REFERENCED_SELECTOR_POOL = 27,
291d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl
292d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl      /// \brief Record code for an update to the TU's lexically contained
293d692af71226d2fb537d86c670af96114ddd485c3Sebastian Redl      /// declarations.
29476c38d385447b7acdff2d7e6b13fa8580e7174a7Argyrios Kyrtzidis      TU_UPDATE_LEXICAL = 28,
29576c38d385447b7acdff2d7e6b13fa8580e7174a7Argyrios Kyrtzidis
296a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis      /// \brief Record code for an update to first decls pointing to the
297a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis      /// latest redeclarations.
298a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis      REDECLS_UPDATE_LATEST = 29,
299a865005c74019184e04f7fcdd4d61c31c095a4ffArgyrios Kyrtzidis
30076c38d385447b7acdff2d7e6b13fa8580e7174a7Argyrios Kyrtzidis      /// \brief Record code for declarations that Sema keeps references of.
30172b90571b1783b17c3f2204cec5ca440edc38beeArgyrios Kyrtzidis      SEMA_DECL_REFS = 30,
30272b90571b1783b17c3f2204cec5ca440edc38beeArgyrios Kyrtzidis
30372b90571b1783b17c3f2204cec5ca440edc38beeArgyrios Kyrtzidis      /// \brief Record code for weak undeclared identifiers.
3040e0363866792b309d70e9c8e92b4c239773af89cArgyrios Kyrtzidis      WEAK_UNDECLARED_IDENTIFIERS = 31,
3050e0363866792b309d70e9c8e92b4c239773af89cArgyrios Kyrtzidis
3060e0363866792b309d70e9c8e92b4c239773af89cArgyrios Kyrtzidis      /// \brief Record code for pending implicit instantiations.
3070b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl      PENDING_IMPLICIT_INSTANTIATIONS = 32,
3080b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl
3090b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl      /// \brief Record code for a decl replacement block.
3100b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl      ///
3110b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl      /// If a declaration is modified after having been deserialized, and then
312f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// written to a dependent AST file, its ID and offset must be added to
3130b17c61e8f143901ce11b4a6e5129ac63aaeee04Sebastian Redl      /// the replacement block.
3148b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl      DECL_REPLACEMENTS = 33,
3158b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl
3168b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl      /// \brief Record code for an update to a decl context's lookup table.
3178b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl      ///
3188b12273c86ede439edf52d35b170fd32b2ed49d4Sebastian Redl      /// In practice, this should only be used for the TU and namespaces.
3196e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl      UPDATE_VISIBLE = 34,
3206e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl
3216e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl      /// \brief Record code for template specializations introduced after
3226e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl      /// serializations of the original template decl.
3236e50e00c2fe6a04b2c35592588a4b10a2c269416Sebastian Redl      ADDITIONAL_TEMPLATE_SPECIALIZATIONS = 35
3242cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    };
3252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
32614f79002e58556798e86168c63e48d533287eda5Douglas Gregor    /// \brief Record types used within a source manager block.
32714f79002e58556798e86168c63e48d533287eda5Douglas Gregor    enum SourceManagerRecordTypes {
32814f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// \brief Describes a source location entry (SLocEntry) for a
32914f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// file.
33014f79002e58556798e86168c63e48d533287eda5Douglas Gregor      SM_SLOC_FILE_ENTRY = 1,
33114f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// \brief Describes a source location entry (SLocEntry) for a
33214f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// buffer.
33314f79002e58556798e86168c63e48d533287eda5Douglas Gregor      SM_SLOC_BUFFER_ENTRY = 2,
33414f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// \brief Describes a blob that contains the data for a buffer
33514f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// entry. This kind of record always directly follows a
33614f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// SM_SLOC_BUFFER_ENTRY record.
33714f79002e58556798e86168c63e48d533287eda5Douglas Gregor      SM_SLOC_BUFFER_BLOB = 3,
33814f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// \brief Describes a source location entry (SLocEntry) for a
33914f79002e58556798e86168c63e48d533287eda5Douglas Gregor      /// macro instantiation.
340bd94500d3aa60092fb0f1e90f53fb0d03fa502a8Douglas Gregor      SM_SLOC_INSTANTIATION_ENTRY = 4,
341bd94500d3aa60092fb0f1e90f53fb0d03fa502a8Douglas Gregor      /// \brief Describes the SourceManager's line table, with
342bd94500d3aa60092fb0f1e90f53fb0d03fa502a8Douglas Gregor      /// information about #line directives.
34312fab31aa5868b1a6b52246b5a87daa48a338fe2Douglas Gregor      SM_LINE_TABLE = 5
34414f79002e58556798e86168c63e48d533287eda5Douglas Gregor    };
3451eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
3467c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner    /// \brief Record types used within a preprocessor block.
3477c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner    enum PreprocessorRecordTypes {
3487c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      // The macros in the PP section are a PP_MACRO_* instance followed by a
3497c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      // list of PP_TOKEN instances for each token in the definition.
3507c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner
3517c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      /// \brief An object-like macro definition.
3527c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
3537c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      PP_MACRO_OBJECT_LIKE = 1,
3547c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner
3557c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      /// \brief A function-like macro definition.
3567c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
3577c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      ///  NumArgs, ArgIdentInfoID* ]
3587c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      PP_MACRO_FUNCTION_LIKE = 2,
3591eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
3607c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner      /// \brief Describes one token.
361c1f9d828c733ec1eba06d01070735d1f36fda733Chris Lattner      /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
3626a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      PP_TOKEN = 3,
3636a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor
3646a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      /// \brief Describes a macro instantiation within the preprocessing
3656a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      /// record.
3666a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      PP_MACRO_INSTANTIATION = 4,
3676a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor
3686a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      /// \brief Describes a macro definition within the preprocessing record.
3696a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bcDouglas Gregor      PP_MACRO_DEFINITION = 5
3707c5d24efcd2e505b5739f7def08dfe25ce59a1b2Chris Lattner    };
37114f79002e58556798e86168c63e48d533287eda5Douglas Gregor
372f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// \defgroup ASTAST AST file AST constants
37314f79002e58556798e86168c63e48d533287eda5Douglas Gregor    ///
37414f79002e58556798e86168c63e48d533287eda5Douglas Gregor    /// The constants in this group describe various components of the
375f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// abstract syntax tree within an AST file.
37614f79002e58556798e86168c63e48d533287eda5Douglas Gregor    ///
37714f79002e58556798e86168c63e48d533287eda5Douglas Gregor    /// @{
37814f79002e58556798e86168c63e48d533287eda5Douglas Gregor
3792cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// \brief Predefined type IDs.
3802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    ///
3812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// These type IDs correspond to predefined types in the AST
3822cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// context, such as built-in types (int) and special place-holder
3832cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// types (the <overload> and <dependent> type markers). Such
3842cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// types are never actually serialized, since they will be built
3852cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// by the AST context when it is created.
3862cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    enum PredefinedTypeIDs {
3872cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The NULL type.
3882cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_NULL_ID       = 0,
3892cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The void type.
3902cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_VOID_ID       = 1,
3912cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'bool' or '_Bool' type.
3922cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_BOOL_ID       = 2,
3932cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'char' type, when it is unsigned.
3942cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_CHAR_U_ID     = 3,
3952cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'unsigned char' type.
3962cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_UCHAR_ID      = 4,
3972cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'unsigned short' type.
3982cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_USHORT_ID     = 5,
3992cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'unsigned int' type.
4002cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_UINT_ID       = 6,
4012cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'unsigned long' type.
4022cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_ULONG_ID      = 7,
4032cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'unsigned long long' type.
4042cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_ULONGLONG_ID  = 8,
4052cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'char' type, when it is signed.
4062cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_CHAR_S_ID     = 9,
4072cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'signed char' type.
4082cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_SCHAR_ID      = 10,
4092cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The C++ 'wchar_t' type.
4102cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_WCHAR_ID      = 11,
4112cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The (signed) 'short' type.
4122cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_SHORT_ID      = 12,
4132cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The (signed) 'int' type.
4142cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_INT_ID        = 13,
4152cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The (signed) 'long' type.
4162cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_LONG_ID       = 14,
4172cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The (signed) 'long long' type.
4182cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_LONGLONG_ID   = 15,
4192cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'float' type.
4202cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_FLOAT_ID      = 16,
4212cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'double' type.
4222cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_DOUBLE_ID     = 17,
4232cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The 'long double' type.
4242cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_LONGDOUBLE_ID = 18,
4252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The placeholder type for overloaded function sets.
4262cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      PREDEF_TYPE_OVERLOAD_ID   = 19,
4272cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief The placeholder type for dependent types.
4282df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner      PREDEF_TYPE_DEPENDENT_ID  = 20,
4292df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner      /// \brief The '__uint128_t' type.
4302df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner      PREDEF_TYPE_UINT128_ID    = 21,
4312df9ced9fd1e8c7d7b38443db07e0e811de22571Chris Lattner      /// \brief The '__int128_t' type.
4326e8ed16ffef02b82995a90bdcf10ffff7d63839aSebastian Redl      PREDEF_TYPE_INT128_ID     = 22,
4336e8ed16ffef02b82995a90bdcf10ffff7d63839aSebastian Redl      /// \brief The type of 'nullptr'.
434f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith      PREDEF_TYPE_NULLPTR_ID    = 23,
435f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith      /// \brief The C++ 'char16_t' type.
436f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith      PREDEF_TYPE_CHAR16_ID     = 24,
437f5c209d23b20ada4a9b6235db50317239cbf6ae1Alisdair Meredith      /// \brief The C++ 'char32_t' type.
438de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff      PREDEF_TYPE_CHAR32_ID     = 25,
439de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff      /// \brief The ObjC 'id' type.
440de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff      PREDEF_TYPE_OBJC_ID       = 26,
441de2e22d33afec98324a66a358dfe0951b3c7259aSteve Naroff      /// \brief The ObjC 'Class' type.
44213dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian      PREDEF_TYPE_OBJC_CLASS    = 27,
44313dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian      /// \brief The ObjC 'SEL' type.
44413dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian      PREDEF_TYPE_OBJC_SEL    = 28
4452cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    };
4462cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
4472cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// \brief The number of predefined type IDs that are reserved for
4482cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// the PREDEF_TYPE_* constants.
4492cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    ///
4502cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// Type IDs for non-predefined types will start at
4512cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// NUM_PREDEF_TYPE_IDs.
4522cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    const unsigned NUM_PREDEF_TYPE_IDS = 100;
4532cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
4542cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// \brief Record codes for each kind of type.
4552cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    ///
45661d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// These constants describe the type records that can occur within a
457f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl    /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
4582cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// constant describes a record for a specific type class in the
4592cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// AST.
4602cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    enum TypeCode {
4612cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An ExtQualType record.
46263f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_EXT_QUAL                 = 1,
4632cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A ComplexType record.
46463f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_COMPLEX                  = 3,
4652cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A PointerType record.
46663f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_POINTER                  = 4,
4672cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A BlockPointerType record.
46863f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_BLOCK_POINTER            = 5,
4692cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An LValueReferenceType record.
47063f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_LVALUE_REFERENCE         = 6,
4712cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An RValueReferenceType record.
47263f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_RVALUE_REFERENCE         = 7,
4732cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A MemberPointerType record.
47463f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_MEMBER_POINTER           = 8,
4752cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A ConstantArrayType record.
47663f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_CONSTANT_ARRAY           = 9,
4772cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An IncompleteArrayType record.
47863f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_INCOMPLETE_ARRAY         = 10,
4792cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A VariableArrayType record.
48063f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_VARIABLE_ARRAY           = 11,
4812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A VectorType record.
48263f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_VECTOR                   = 12,
4832cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An ExtVectorType record.
48463f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_EXT_VECTOR               = 13,
4852cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A FunctionNoProtoType record.
48663f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_FUNCTION_NO_PROTO        = 14,
4872cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A FunctionProtoType record.
48863f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_FUNCTION_PROTO           = 15,
4892cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A TypedefType record.
49063f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_TYPEDEF                  = 16,
4912cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A TypeOfExprType record.
49263f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_TYPEOF_EXPR              = 17,
4932cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A TypeOfType record.
49463f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_TYPEOF                   = 18,
4952cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A RecordType record.
49663f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_RECORD                   = 19,
4972cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An EnumType record.
49863f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_ENUM                     = 20,
4992cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief An ObjCInterfaceType record.
50063f5c2646e75041277657aa1392a5bdd643367a7Douglas Gregor      TYPE_OBJC_INTERFACE           = 21,
501d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bcSteve Naroff      /// \brief An ObjCObjectPointerType record.
502c15cb2af27514ecc879daba9aa01389c5203685dSteve Naroff      TYPE_OBJC_OBJECT_POINTER      = 22,
503395b475a4474f1c7574d927ad142ca0c7997cbcaAnders Carlsson      /// \brief a DecltypeType record.
50454e14c4db764c0636160d26c5bbf491637c83a76John McCall      TYPE_DECLTYPE                 = 23,
5057da2431c23ef1ee8acb114e39692246e1801afc2John McCall      /// \brief An ElaboratedType record.
50654e14c4db764c0636160d26c5bbf491637c83a76John McCall      TYPE_ELABORATED               = 24,
50749a832bd499d6f61c23655f1fac99f0dd229756eJohn McCall      /// \brief A SubstTemplateTypeParmType record.
508ed97649e9574b9d854fa4d6109c9333ae0993554John McCall      TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
509ed97649e9574b9d854fa4d6109c9333ae0993554John McCall      /// \brief An UnresolvedUsingType record.
5103cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4John McCall      TYPE_UNRESOLVED_USING         = 26,
5113cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4John McCall      /// \brief An InjectedClassNameType record.
512c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44eJohn McCall      TYPE_INJECTED_CLASS_NAME      = 27,
513c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44eJohn McCall      /// \brief An ObjCObjectType record.
51490b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis      TYPE_OBJC_OBJECT              = 28,
51590b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis      /// \brief An TemplateTypeParmType record.
51690b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis      TYPE_TEMPLATE_TYPE_PARM       = 29,
51790b715e0df34eae2b50b9b43ec60828ed31dcf94Argyrios Kyrtzidis      /// \brief An TemplateSpecializationType record.
5188dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfeArgyrios Kyrtzidis      TYPE_TEMPLATE_SPECIALIZATION  = 30,
5193acad62a239448bef0f5848b2a0d5f7dfefd3d14Argyrios Kyrtzidis      /// \brief A DependentNameType record.
5203acad62a239448bef0f5848b2a0d5f7dfefd3d14Argyrios Kyrtzidis      TYPE_DEPENDENT_NAME           = 31,
5213acad62a239448bef0f5848b2a0d5f7dfefd3d14Argyrios Kyrtzidis      /// \brief A DependentTemplateSpecializationType record.
522ae8b17f1d5d303af53db5a4f4a375ea6b9356566Argyrios Kyrtzidis      TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
523ae8b17f1d5d303af53db5a4f4a375ea6b9356566Argyrios Kyrtzidis      /// \brief A DependentSizedArrayType record.
524ae8b17f1d5d303af53db5a4f4a375ea6b9356566Argyrios Kyrtzidis      TYPE_DEPENDENT_SIZED_ARRAY    = 33
5252cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    };
5262cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
527ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    /// \brief The type IDs for special types constructed by semantic
528ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    /// analysis.
529ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    ///
530ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    /// The constants in this enumeration are indices into the
531ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    /// SPECIAL_TYPES record.
532ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    enum SpecialTypeIDs {
533ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor      /// \brief __builtin_va_list
534319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      SPECIAL_TYPE_BUILTIN_VA_LIST             = 0,
535319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      /// \brief Objective-C "id" type
536319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      SPECIAL_TYPE_OBJC_ID                     = 1,
537319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      /// \brief Objective-C selector type
538319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      SPECIAL_TYPE_OBJC_SELECTOR               = 2,
539319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      /// \brief Objective-C Protocol type
540319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      SPECIAL_TYPE_OBJC_PROTOCOL               = 3,
541319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      /// \brief Objective-C Class type
542319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      SPECIAL_TYPE_OBJC_CLASS                  = 4,
543319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      /// \brief CFConstantString type
544319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      SPECIAL_TYPE_CF_CONSTANT_STRING          = 5,
545319ac896a0fef7365d5589b8021db7e41207fe42Douglas Gregor      /// \brief Objective-C fast enumeration state type
546c29f77b769bcc5b6dc85e72c8e3cc2e348e5cf25Douglas Gregor      SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE = 6,
547c29f77b769bcc5b6dc85e72c8e3cc2e348e5cf25Douglas Gregor      /// \brief C FILE typedef type
548782fa308a765aeac2acb39c4e697c937ec21185bMike Stump      SPECIAL_TYPE_FILE                        = 7,
549782fa308a765aeac2acb39c4e697c937ec21185bMike Stump      /// \brief C jmp_buf typedef type
550782fa308a765aeac2acb39c4e697c937ec21185bMike Stump      SPECIAL_TYPE_jmp_buf                     = 8,
551782fa308a765aeac2acb39c4e697c937ec21185bMike Stump      /// \brief C sigjmp_buf typedef type
552d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor      SPECIAL_TYPE_sigjmp_buf                  = 9,
553d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor      /// \brief Objective-C "id" redefinition type
554d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor      SPECIAL_TYPE_OBJC_ID_REDEFINITION        = 10,
555d1571acc700b652a52c766e36a6c688d9bf6f3a1Douglas Gregor      /// \brief Objective-C "Class" redefinition type
556adaaad3715c9c26cdcfdfe3401a13d7b4423ddcfMike Stump      SPECIAL_TYPE_OBJC_CLASS_REDEFINITION     = 11,
557adaaad3715c9c26cdcfdfe3401a13d7b4423ddcfMike Stump      /// \brief Block descriptor type for Blocks CodeGen
558083c25eea14bb4cc4ecc3ec763c60e2e609e22bdMike Stump      SPECIAL_TYPE_BLOCK_DESCRIPTOR            = 12,
559083c25eea14bb4cc4ecc3ec763c60e2e609e22bdMike Stump      /// \brief Block extedned descriptor type for Blocks CodeGen
56013dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian      SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR   = 13,
56113dcd00615de5c4279d97bdf63cd5f0a14fd9dccFariborz Jahanian      /// \brief Objective-C "SEL" redefinition type
5622bb5ddaff86ee73d2cea7ec1835978afc88a83f0Fariborz Jahanian      SPECIAL_TYPE_OBJC_SEL_REDEFINITION       = 14,
5632bb5ddaff86ee73d2cea7ec1835978afc88a83f0Fariborz Jahanian      /// \brief NSConstantString type
564006113841bdae1edb77aef75ba1ffdf2e55a3094Argyrios Kyrtzidis      SPECIAL_TYPE_NS_CONSTANT_STRING          = 15,
565006113841bdae1edb77aef75ba1ffdf2e55a3094Argyrios Kyrtzidis      /// \brief Whether __[u]int128_t identifier is installed.
566006113841bdae1edb77aef75ba1ffdf2e55a3094Argyrios Kyrtzidis      SPECIAL_TYPE_INT128_INSTALLED            = 16
567ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor    };
568ad1de006ea080b540e480efc6b86c2e201dbf1ecDouglas Gregor
5692cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// \brief Record codes for each kind of declaration.
5702cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    ///
57161d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// These constants describe the declaration records that can occur within
57261d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// a declarations block (identified by DECLS_BLOCK_ID). Each
5732cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// constant describes a record for a specific declaration class
5742cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    /// in the AST.
5752cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    enum DeclCode {
57668a2eb0cc76267ba0615992fb5e0977853c397b2Douglas Gregor      /// \brief Attributes attached to a declaration.
57761d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      DECL_ATTR = 50,
5782cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A TranslationUnitDecl record.
57968a2eb0cc76267ba0615992fb5e0977853c397b2Douglas Gregor      DECL_TRANSLATION_UNIT,
5802cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A TypedefDecl record.
5812cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      DECL_TYPEDEF,
5820a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor      /// \brief An EnumDecl record.
5830a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor      DECL_ENUM,
5848c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor      /// \brief A RecordDecl record.
5858c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor      DECL_RECORD,
5860a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor      /// \brief An EnumConstantDecl record.
5870a2b45e5885b6b8477b167042c0f6cd1d99a1f13Douglas Gregor      DECL_ENUM_CONSTANT,
5883a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor      /// \brief A FunctionDecl record.
5893a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor      DECL_FUNCTION,
59053c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eecSteve Naroff      /// \brief A ObjCMethodDecl record.
59153c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eecSteve Naroff      DECL_OBJC_METHOD,
59233feeb019a5742b286eededd5446ec0fe87c5a61Steve Naroff      /// \brief A ObjCInterfaceDecl record.
59330833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_INTERFACE,
59430833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCProtocolDecl record.
59530833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_PROTOCOL,
59633feeb019a5742b286eededd5446ec0fe87c5a61Steve Naroff      /// \brief A ObjCIvarDecl record.
59730833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_IVAR,
59830833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCAtDefsFieldDecl record.
59930833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_AT_DEFS_FIELD,
60030833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCClassDecl record.
60130833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_CLASS,
60230833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCForwardProtocolDecl record.
60330833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_FORWARD_PROTOCOL,
60430833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCCategoryDecl record.
60530833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_CATEGORY,
60630833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCCategoryImplDecl record.
60730833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_CATEGORY_IMPL,
60830833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCImplementationDecl record.
60930833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_IMPLEMENTATION,
61030833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCCompatibleAliasDecl record.
61130833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_COMPATIBLE_ALIAS,
61230833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCPropertyDecl record.
61330833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_PROPERTY,
61430833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      /// \brief A ObjCPropertyImplDecl record.
61530833f8d77c08f8f16371776fde85a9fde3d9b6eSteve Naroff      DECL_OBJC_PROPERTY_IMPL,
6168c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor      /// \brief A FieldDecl record.
6178c70006581a9b9e9485570ca727a6c5f7be63521Douglas Gregor      DECL_FIELD,
6182cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A VarDecl record.
6192cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      DECL_VAR,
620405bad07391494d2eb025f8222c256c66b56e5f8Douglas Gregor      /// \brief An ImplicitParamDecl record.
621405bad07391494d2eb025f8222c256c66b56e5f8Douglas Gregor      DECL_IMPLICIT_PARAM,
6223a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor      /// \brief A ParmVarDecl record.
6233a2f7e42514ddbec983c61826ce85d3071e23e8eDouglas Gregor      DECL_PARM_VAR,
6241028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor      /// \brief A FileScopeAsmDecl record.
6251028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor      DECL_FILE_SCOPE_ASM,
6261028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor      /// \brief A BlockDecl record.
6271028bc67d56ea088c3a57c4c44c3f6aeff60a031Douglas Gregor      DECL_BLOCK,
6282cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A record that stores the set of declarations that are
6292cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// lexically stored within a given DeclContext.
6302cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      ///
631681d7237e1014bf64dd5ead6bf74ae55cdd19e61Sebastian Redl      /// The record itself is a blob that is an array of declaration IDs,
632681d7237e1014bf64dd5ead6bf74ae55cdd19e61Sebastian Redl      /// in the order in which those declarations were added to the
6332cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// declaration context. This data is used when iterating over
6342cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// the contents of a DeclContext, e.g., via
6352cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// DeclContext::decls_begin()/DeclContext::decls_end().
6362cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      DECL_CONTEXT_LEXICAL,
6372cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// \brief A record that stores the set of declarations that are
6382cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// visible from a given DeclContext.
6392cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      ///
6402cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// The record itself stores a set of mappings, each of which
6412cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// associates a declaration name with one or more declaration
6422cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// IDs. This data is used when performing qualified name lookup
6432cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor      /// into a DeclContext via DeclContext::lookup.
6440cef483f3b9d6a7f9fdbc5910d0a3ed64130e8e1Douglas Gregor      DECL_CONTEXT_VISIBLE,
6456ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A NamespaceDecl rcord.
6466ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_NAMESPACE,
6476ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A NamespaceAliasDecl record.
6486ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_NAMESPACE_ALIAS,
6496ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A UsingDecl record.
6506ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_USING,
6516ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A UsingShadowDecl record.
6526ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_USING_SHADOW,
6536ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A UsingDirecitveDecl record.
6546ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_USING_DIRECTIVE,
6556ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief An UnresolvedUsingValueDecl record.
6566ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_UNRESOLVED_USING_VALUE,
6576ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief An UnresolvedUsingTypenameDecl record.
6586ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_UNRESOLVED_USING_TYPENAME,
6596ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A LinkageSpecDecl record.
6606ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_LINKAGE_SPEC,
6616ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A CXXRecordDecl record.
6626ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CXX_RECORD,
6636ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A CXXMethodDecl record.
6646ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CXX_METHOD,
6656ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A CXXConstructorDecl record.
6666ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CXX_CONSTRUCTOR,
6676ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A CXXDestructorDecl record.
6686ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CXX_DESTRUCTOR,
6696ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      /// \brief A CXXConversionDecl record.
6706ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CXX_CONVERSION,
6716206d53f67613958ae1b023aba337ebb46f11a8bAbramo Bagnara      /// \brief An AccessSpecDecl record.
6726206d53f67613958ae1b023aba337ebb46f11a8bAbramo Bagnara      DECL_ACCESS_SPEC,
6736ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner
6745f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A FriendDecl record.
6756ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_FRIEND,
6765f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A FriendTemplateDecl record.
6776ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_FRIEND_TEMPLATE,
6785f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A ClassTemplateDecl record.
6796ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CLASS_TEMPLATE,
6805f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A ClassTemplateSpecializationDecl record.
6816ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CLASS_TEMPLATE_SPECIALIZATION,
6825f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A ClassTemplatePartialSpecializationDecl record.
6836ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
6845f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A FunctionTemplateDecl record.
6856ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_FUNCTION_TEMPLATE,
6865f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A TemplateTypeParmDecl record.
6876ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_TEMPLATE_TYPE_PARM,
6885f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A NonTypeTemplateParmDecl record.
6896ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_NON_TYPE_TEMPLATE_PARM,
6905f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A TemplateTemplateParmDecl record.
6916ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_TEMPLATE_TEMPLATE_PARM,
6925f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999cArgyrios Kyrtzidis      /// \brief A StaticAssertDecl record.
6936ad9ac097918fbdeb443ea7b99d4db9e49b28534Chris Lattner      DECL_STATIC_ASSERT
6942cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor    };
6950b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor
6960b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor    /// \brief Record codes for each kind of statement or expression.
6970b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor    ///
6980b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor    /// These constants describe the records that describe statements
69961d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// or expressions. These records  occur within type and declarations
70061d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// block, so they begin with record values of 100.  Each constant
70161d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// describes a record for a specific statement or expression class in the
70261d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor    /// AST.
7030b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor    enum StmtCode {
704087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor      /// \brief A marker record that indicates that we are at the end
705087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor      /// of an expression.
70661d60ee6aa0a5ded0ddcf48679673b37506a1895Douglas Gregor      STMT_STOP = 100,
7070b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor      /// \brief A NULL expression.
708c9490c000f515c29f200a1215328d8ab9a0f3818Douglas Gregor      STMT_NULL_PTR,
709025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief A NullStmt record.
710025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_NULL,
711025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief A CompoundStmt record.
712025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_COMPOUND,
713025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief A CaseStmt record.
714025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_CASE,
715025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief A DefaultStmt record.
716025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_DEFAULT,
7171de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor      /// \brief A LabelStmt record.
7181de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor      STMT_LABEL,
719025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief An IfStmt record.
720025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_IF,
721025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief A SwitchStmt record.
722025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_SWITCH,
723d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor      /// \brief A WhileStmt record.
724d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor      STMT_WHILE,
72567d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor      /// \brief A DoStmt record.
72667d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor      STMT_DO,
72767d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor      /// \brief A ForStmt record.
72867d8249924ef38a5375ff9c92cd21c1854d6ababDouglas Gregor      STMT_FOR,
7291de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor      /// \brief A GotoStmt record.
7301de05feeeafe5b215fe7617594a7076a5192a6e2Douglas Gregor      STMT_GOTO,
7317d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41fDouglas Gregor      /// \brief An IndirectGotoStmt record.
7327d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41fDouglas Gregor      STMT_INDIRECT_GOTO,
733d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor      /// \brief A ContinueStmt record.
734d921cf976b4769af8d06d6763a2547dadf7940abDouglas Gregor      STMT_CONTINUE,
735025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      /// \brief A BreakStmt record.
736025452fa0eda63e150cfaeebe64f0a19c96b3a06Douglas Gregor      STMT_BREAK,
7370de9d8857b715c2f45c987651f4ce06d73330d93Douglas Gregor      /// \brief A ReturnStmt record.
7380de9d8857b715c2f45c987651f4ce06d73330d93Douglas Gregor      STMT_RETURN,
73984f2170062014d268951902164bed0d8bdea0e82Douglas Gregor      /// \brief A DeclStmt record.
74084f2170062014d268951902164bed0d8bdea0e82Douglas Gregor      STMT_DECL,
741cd7d5a9dc558178ed7a66032f888781b3c592e4fDouglas Gregor      /// \brief An AsmStmt record.
742cd7d5a9dc558178ed7a66032f888781b3c592e4fDouglas Gregor      STMT_ASM,
74317fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor      /// \brief A PredefinedExpr record.
74417fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor      EXPR_PREDEFINED,
7450b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor      /// \brief A DeclRefExpr record.
7460b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor      EXPR_DECL_REF,
7470b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor      /// \brief An IntegerLiteral record.
7480b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor      EXPR_INTEGER_LITERAL,
74917fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor      /// \brief A FloatingLiteral record.
75017fc223395d51be582fc666bb6ea21bd1dff26dcDouglas Gregor      EXPR_FLOATING_LITERAL,
751cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor      /// \brief An ImaginaryLiteral record.
752cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor      EXPR_IMAGINARY_LITERAL,
753673ecd6a4a9f7c12fb6f76f84f654dbdcdc89e76Douglas Gregor      /// \brief A StringLiteral record.
754673ecd6a4a9f7c12fb6f76f84f654dbdcdc89e76Douglas Gregor      EXPR_STRING_LITERAL,
7550b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor      /// \brief A CharacterLiteral record.
756087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor      EXPR_CHARACTER_LITERAL,
757c04db4feefa2b0dbbc6876cb4eeeee108aa6791dDouglas Gregor      /// \brief A ParenExpr record.
758c04db4feefa2b0dbbc6876cb4eeeee108aa6791dDouglas Gregor      EXPR_PAREN,
75937bdfe284ad365f753741d1d89c078c148b3f4afArgyrios Kyrtzidis      /// \brief A ParenListExpr record.
76037bdfe284ad365f753741d1d89c078c148b3f4afArgyrios Kyrtzidis      EXPR_PAREN_LIST,
7610b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor      /// \brief A UnaryOperator record.
7620b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor      EXPR_UNARY_OPERATOR,
7638ecdb65716cd7914ffb2eeee993fa9039fcd31e8Douglas Gregor      /// \brief An OffsetOfExpr record.
7648ecdb65716cd7914ffb2eeee993fa9039fcd31e8Douglas Gregor      EXPR_OFFSETOF,
7650b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor      /// \brief A SizefAlignOfExpr record.
7660b0b77fa29c74c99a77548ed86ca8a04f7cf6b02Douglas Gregor      EXPR_SIZEOF_ALIGN_OF,
767cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor      /// \brief An ArraySubscriptExpr record.
768cb2ca73c1d7e76cc1358ce51457d2d5837d84f9bDouglas Gregor      EXPR_ARRAY_SUBSCRIPT,
7691f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor      /// \brief A CallExpr record.
7701f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor      EXPR_CALL,
7711f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor      /// \brief A MemberExpr record.
7721f0d0133b0e8d1f01f63951ee04927796b34740dDouglas Gregor      EXPR_MEMBER,
773db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor      /// \brief A BinaryOperator record.
774db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor      EXPR_BINARY_OPERATOR,
775ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor      /// \brief A CompoundAssignOperator record.
776ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor      EXPR_COMPOUND_ASSIGN_OPERATOR,
777ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor      /// \brief A ConditionOperator record.
778ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6Douglas Gregor      EXPR_CONDITIONAL_OPERATOR,
779087fd536809ebe754d91c641a98917e02dd7452dDouglas Gregor      /// \brief An ImplicitCastExpr record.
780db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor      EXPR_IMPLICIT_CAST,
781db600c330a37b1c3ab4533310729910ee188f900Douglas Gregor      /// \brief A CStyleCastExpr record.
782d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor      EXPR_CSTYLE_CAST,
783ba6d7e7fa5f79959d3eef39adb5620d845ba5198Douglas Gregor      /// \brief A CompoundLiteralExpr record.
784ba6d7e7fa5f79959d3eef39adb5620d845ba5198Douglas Gregor      EXPR_COMPOUND_LITERAL,
785d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor      /// \brief An ExtVectorElementExpr record.
786d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor      EXPR_EXT_VECTOR_ELEMENT,
787d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief An InitListExpr record.
788d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      EXPR_INIT_LIST,
789d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief A DesignatedInitExpr record.
790d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      EXPR_DESIGNATED_INIT,
791d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief An ImplicitValueInitExpr record.
792d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      EXPR_IMPLICIT_VALUE_INIT,
793d3c98a02c73417689deaaa6671ea6df7f2a8a73cDouglas Gregor      /// \brief A VAArgExpr record.
79444cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor      EXPR_VA_ARG,
7956a2dd55b0b3ae376d449a4b07bbb6b2d30b26330Douglas Gregor      /// \brief An AddrLabelExpr record.
7967d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41fDouglas Gregor      EXPR_ADDR_LABEL,
7976a2dd55b0b3ae376d449a4b07bbb6b2d30b26330Douglas Gregor      /// \brief A StmtExpr record.
7986a2dd55b0b3ae376d449a4b07bbb6b2d30b26330Douglas Gregor      EXPR_STMT,
79944cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor      /// \brief A TypesCompatibleExpr record.
80044cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor      EXPR_TYPES_COMPATIBLE,
80144cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor      /// \brief A ChooseExpr record.
80244cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor      EXPR_CHOOSE,
80344cae0c8669cdf83618cbe7fd36ea7a8e51cf97fDouglas Gregor      /// \brief A GNUNullExpr record.
80494cd5d1397bb1a8bcd109602aa38dd787b164c22Douglas Gregor      EXPR_GNU_NULL,
80594cd5d1397bb1a8bcd109602aa38dd787b164c22Douglas Gregor      /// \brief A ShuffleVectorExpr record.
80694cd5d1397bb1a8bcd109602aa38dd787b164c22Douglas Gregor      EXPR_SHUFFLE_VECTOR,
80784af7c27cdc615ff917a501d61256b4049383c97Douglas Gregor      /// \brief BlockExpr
80884af7c27cdc615ff917a501d61256b4049383c97Douglas Gregor      EXPR_BLOCK,
80984af7c27cdc615ff917a501d61256b4049383c97Douglas Gregor      /// \brief A BlockDeclRef record.
8104dcf151a555ff51e4d643e8e6eeb80f121d11d1bChris Lattner      EXPR_BLOCK_DECL_REF,
81139da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor
8124dcf151a555ff51e4d643e8e6eeb80f121d11d1bChris Lattner      // Objective-C
8131eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
8140389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCStringLiteral record.
8153a57a3765b6192a94ff4e5997ae0489a1471b308Chris Lattner      EXPR_OBJC_STRING_LITERAL,
8160389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCEncodeExpr record.
8173a57a3765b6192a94ff4e5997ae0489a1471b308Chris Lattner      EXPR_OBJC_ENCODE,
8180389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCSelectorExpr record.
8193a57a3765b6192a94ff4e5997ae0489a1471b308Chris Lattner      EXPR_OBJC_SELECTOR_EXPR,
8200389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCProtocolExpr record.
821c4f0bbdb166fbc31ab2cf0f6ff573fde9fa307b3Steve Naroff      EXPR_OBJC_PROTOCOL_EXPR,
8220389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCIvarRefExpr record.
8230389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      EXPR_OBJC_IVAR_REF_EXPR,
8240389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCPropertyRefExpr record.
8250389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      EXPR_OBJC_PROPERTY_REF_EXPR,
82609105f52b1f28cbb1374c27c3c70f5517e2c465dFariborz Jahanian      /// \brief An ObjCImplicitSetterGetterRefExpr record.
8270389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      EXPR_OBJC_KVC_REF_EXPR,
8280389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCMessageExpr record.
8290389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      EXPR_OBJC_MESSAGE_EXPR,
8300389e6bd0159bfdd08f7c50a37543b6e3adf0c33Chris Lattner      /// \brief An ObjCSuperExpr record.
8311eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff      EXPR_OBJC_SUPER_EXPR,
832f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3Steve Naroff      /// \brief An ObjCIsa Expr record.
833f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3Steve Naroff      EXPR_OBJC_ISA,
8341eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump
8351eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump      /// \brief An ObjCForCollectionStmt record.
8361eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff      STMT_OBJC_FOR_COLLECTION,
8371eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump      /// \brief An ObjCAtCatchStmt record.
8381eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff      STMT_OBJC_CATCH,
8391eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump      /// \brief An ObjCAtFinallyStmt record.
8401eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff      STMT_OBJC_FINALLY,
8411eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump      /// \brief An ObjCAtTryStmt record.
8421eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff      STMT_OBJC_AT_TRY,
8431eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump      /// \brief An ObjCAtSynchronizedStmt record.
8441eb5540760dc79502e32d4fe9c28217476ea14b9Steve Naroff      STMT_OBJC_AT_SYNCHRONIZED,
8451eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump      /// \brief An ObjCAtThrowStmt record.
846ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis      STMT_OBJC_AT_THROW,
847ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis
848ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis      // C++
8497cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis
8507cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis      /// \brief A CXXCatchStmt record.
8517cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis      STMT_CXX_CATCH,
8527cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis      /// \brief A CXXTryStmt record.
8537cb45e37b6f924d9ddbc53ac023bbaadb4ca3534Argyrios Kyrtzidis      STMT_CXX_TRY,
854ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8Argyrios Kyrtzidis
85539da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor      /// \brief A CXXOperatorCallExpr record.
85639da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor      EXPR_CXX_OPERATOR_CALL,
8571817bd483b538fd3f4530649f5cb900bad9e8a76Chris Lattner      /// \brief A CXXMemberCallExpr record.
8581817bd483b538fd3f4530649f5cb900bad9e8a76Chris Lattner      EXPR_CXX_MEMBER_CALL,
85939da0b8145eaec7da7004f9b3645c5c9f4f63b1dDouglas Gregor      /// \brief A CXXConstructExpr record.
860ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig      EXPR_CXX_CONSTRUCT,
8616d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis      /// \brief A CXXTemporaryObjectExpr record.
8626d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis      EXPR_CXX_TEMPORARY_OBJECT,
863f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief A CXXStaticCastExpr record.
864ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig      EXPR_CXX_STATIC_CAST,
865f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief A CXXDynamicCastExpr record.
866ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig      EXPR_CXX_DYNAMIC_CAST,
867f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief A CXXReinterpretCastExpr record.
868ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig      EXPR_CXX_REINTERPRET_CAST,
869f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief A CXXConstCastExpr record.
870ce757a7a1ee905f87551996a69da3e95e8afeeb7Sam Weinig      EXPR_CXX_CONST_CAST,
871f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief A CXXFunctionalCastExpr record.
872eb7f96141f754150a92433286fa385910a22f494Sam Weinig      EXPR_CXX_FUNCTIONAL_CAST,
873f29f0a28c4d9599b389bbb6d186e14af753dc5a3Sebastian Redl      /// \brief A CXXBoolLiteralExpr record.
874eb7f96141f754150a92433286fa385910a22f494Sam Weinig      EXPR_CXX_BOOL_LITERAL,
87514ab24f01e36d495fce183aa67b41e45cdd54f39Chris Lattner      EXPR_CXX_NULL_PTR_LITERAL,  // CXXNullPtrLiteralExpr
87614ab24f01e36d495fce183aa67b41e45cdd54f39Chris Lattner      EXPR_CXX_TYPEID_EXPR,       // CXXTypeidExpr (of expr).
8772fbdfcdf3bbf7b941853d38b123930755e837437Chris Lattner      EXPR_CXX_TYPEID_TYPE,       // CXXTypeidExpr (of type).
8782fbdfcdf3bbf7b941853d38b123930755e837437Chris Lattner      EXPR_CXX_THIS,              // CXXThisExpr
879030854b95f7bfd86aaa8afd9ae1aff9768a37e9aChris Lattner      EXPR_CXX_THROW,             // CXXThrowExpr
880d2598368876cfe40bc8465540033bc5b5e58d8afChris Lattner      EXPR_CXX_DEFAULT_ARG,       // CXXDefaultArgExpr
881d2598368876cfe40bc8465540033bc5b5e58d8afChris Lattner      EXPR_CXX_BIND_TEMPORARY,    // CXXBindTemporaryExpr
8826d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis      EXPR_CXX_BIND_REFERENCE,    // CXXBindReferenceExpr
8836d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis
884ed8abf18329df67b0abcbb3a10458bd8c1d2a595Douglas Gregor      EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
8855921863d8f24084797863b5df37842113bac4352Chris Lattner      EXPR_CXX_NEW,               // CXXNewExpr
88695fc98ce95d4faa4f1bb2783384150530404ea6fArgyrios Kyrtzidis      EXPR_CXX_DELETE,            // CXXDeleteExpr
887de4bd18bb45a1db68996cfb949db3015fc25d10dArgyrios Kyrtzidis      EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
888d2598368876cfe40bc8465540033bc5b5e58d8afChris Lattner
8898dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfeArgyrios Kyrtzidis      EXPR_CXX_EXPR_WITH_TEMPORARIES, // CXXExprWithTemporaries
8908dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfeArgyrios Kyrtzidis
8918dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfeArgyrios Kyrtzidis      EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr
89212dffcddb60380c5bed4f085a1f51534afda3b87Argyrios Kyrtzidis      EXPR_CXX_DEPENDENT_SCOPE_DECL_REF,   // DependentScopeDeclRefExpr
893a77eb0862507b900a10fa352af1568e639ed10b1Argyrios Kyrtzidis      EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr
894bd65bb511c26549c96b829c1282e4c877588564aArgyrios Kyrtzidis      EXPR_CXX_UNRESOLVED_MEMBER,    // UnresolvedMemberExpr
8956d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis      EXPR_CXX_UNRESOLVED_LOOKUP,     // UnresolvedLookupExpr
8966d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis
8976d00c1365dd3601f6d93bbda9162913c57ae788fArgyrios Kyrtzidis      EXPR_CXX_UNARY_TYPE_TRAIT   // UnaryTypeTraitExpr
8980b7489194f9f89fac39d57211c1e7953ae50251fDouglas Gregor    };
899d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor
900d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor    /// \brief The kinds of designators that can occur in a
901d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor    /// DesignatedInitExpr.
902d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor    enum DesignatorTypes {
903d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief Field designator where only the field name is known.
904d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      DESIG_FIELD_NAME  = 0,
905d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief Field designator where the field has been resolved to
906d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// a declaration.
907d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      DESIG_FIELD_DECL  = 1,
908d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief Array designator.
909d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      DESIG_ARRAY       = 2,
910d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      /// \brief GNU array range designator.
911d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor      DESIG_ARRAY_RANGE = 3
912d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor    };
913d077d759d0c7fceee98f4e77b6423a3f11cfc849Douglas Gregor
91414f79002e58556798e86168c63e48d533287eda5Douglas Gregor    /// @}
9152cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor  }
9162cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor} // end namespace clang
9172cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor
9182cf2634ffdb4f7c8d46cef3f8e60a55993f1c57aDouglas Gregor#endif
919