clang  3.7.0
ASTBitCodes.h
Go to the documentation of this file.
1 //===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header defines Bitcode enum values for Clang serialized AST files.
11 //
12 // The enum values defined in this file should be considered permanent. If
13 // new features are added, they should have values added at the end of the
14 // respective lists.
15 //
16 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
18 #define LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
19 
20 #include "clang/AST/Type.h"
21 #include "llvm/ADT/DenseMap.h"
22 #include "llvm/Bitcode/BitCodes.h"
23 #include "llvm/Support/DataTypes.h"
24 
25 namespace clang {
26  namespace serialization {
27  /// \brief AST file major version number supported by this version of
28  /// Clang.
29  ///
30  /// Whenever the AST file format changes in a way that makes it
31  /// incompatible with previous versions (such that a reader
32  /// designed for the previous version could not support reading
33  /// the new version), this number should be increased.
34  ///
35  /// Version 4 of AST files also requires that the version control branch and
36  /// revision match exactly, since there is no backward compatibility of
37  /// AST files at this time.
38  const unsigned VERSION_MAJOR = 6;
39 
40  /// \brief AST file minor version number supported by this version of
41  /// Clang.
42  ///
43  /// Whenever the AST format changes in a way that is still
44  /// compatible with previous versions (such that a reader designed
45  /// for the previous version could still support reading the new
46  /// version by ignoring new kinds of subblocks), this number
47  /// should be increased.
48  const unsigned VERSION_MINOR = 0;
49 
50  /// \brief An ID number that refers to an identifier in an AST file.
51  ///
52  /// The ID numbers of identifiers are consecutive (in order of discovery)
53  /// and start at 1. 0 is reserved for NULL.
54  typedef uint32_t IdentifierID;
55 
56  /// \brief An ID number that refers to a declaration in an AST file.
57  ///
58  /// The ID numbers of declarations are consecutive (in order of
59  /// discovery), with values below NUM_PREDEF_DECL_IDS being reserved.
60  /// At the start of a chain of precompiled headers, declaration ID 1 is
61  /// used for the translation unit declaration.
62  typedef uint32_t DeclID;
63 
64  /// \brief a Decl::Kind/DeclID pair.
65  typedef std::pair<uint32_t, DeclID> KindDeclIDPair;
66 
67  // FIXME: Turn these into classes so we can have some type safety when
68  // we go from local ID to global and vice-versa.
71 
72  /// \brief An ID number that refers to a type in an AST file.
73  ///
74  /// The ID of a type is partitioned into two parts: the lower
75  /// three bits are used to store the const/volatile/restrict
76  /// qualifiers (as with QualType) and the upper bits provide a
77  /// type index. The type index values are partitioned into two
78  /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
79  /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
80  /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
81  /// other types that have serialized representations.
82  typedef uint32_t TypeID;
83 
84  /// \brief A type index; the type ID with the qualifier bits removed.
85  class TypeIdx {
86  uint32_t Idx;
87  public:
88  TypeIdx() : Idx(0) { }
89  explicit TypeIdx(uint32_t index) : Idx(index) { }
90 
91  uint32_t getIndex() const { return Idx; }
92  TypeID asTypeID(unsigned FastQuals) const {
93  if (Idx == uint32_t(-1))
94  return TypeID(-1);
95 
96  return (Idx << Qualifiers::FastWidth) | FastQuals;
97  }
99  if (ID == TypeID(-1))
100  return TypeIdx(-1);
101 
102  return TypeIdx(ID >> Qualifiers::FastWidth);
103  }
104  };
105 
106  /// A structure for putting "fast"-unqualified QualTypes into a
107  /// DenseMap. This uses the standard pointer hash function.
109  static inline bool isEqual(QualType A, QualType B) { return A == B; }
110  static inline QualType getEmptyKey() {
111  return QualType::getFromOpaquePtr((void*) 1);
112  }
113  static inline QualType getTombstoneKey() {
114  return QualType::getFromOpaquePtr((void*) 2);
115  }
116  static inline unsigned getHashValue(QualType T) {
117  assert(!T.getLocalFastQualifiers() &&
118  "hash invalid for types with fast quals");
119  uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
120  return (unsigned(v) >> 4) ^ (unsigned(v) >> 9);
121  }
122  };
123 
124  /// \brief An ID number that refers to an identifier in an AST file.
125  typedef uint32_t IdentID;
126 
127  /// \brief The number of predefined identifier IDs.
128  const unsigned int NUM_PREDEF_IDENT_IDS = 1;
129 
130  /// \brief An ID number that refers to a macro in an AST file.
131  typedef uint32_t MacroID;
132 
133  /// \brief A global ID number that refers to a macro in an AST file.
134  typedef uint32_t GlobalMacroID;
135 
136  /// \brief A local to a module ID number that refers to a macro in an
137  /// AST file.
138  typedef uint32_t LocalMacroID;
139 
140  /// \brief The number of predefined macro IDs.
141  const unsigned int NUM_PREDEF_MACRO_IDS = 1;
142 
143  /// \brief An ID number that refers to an ObjC selector in an AST file.
144  typedef uint32_t SelectorID;
145 
146  /// \brief The number of predefined selector IDs.
147  const unsigned int NUM_PREDEF_SELECTOR_IDS = 1;
148 
149  /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an
150  /// AST file.
151  typedef uint32_t CXXBaseSpecifiersID;
152 
153  /// \brief An ID number that refers to a list of CXXCtorInitializers in an
154  /// AST file.
155  typedef uint32_t CXXCtorInitializersID;
156 
157  /// \brief An ID number that refers to an entity in the detailed
158  /// preprocessing record.
159  typedef uint32_t PreprocessedEntityID;
160 
161  /// \brief An ID number that refers to a submodule in a module file.
162  typedef uint32_t SubmoduleID;
163 
164  /// \brief The number of predefined submodule IDs.
165  const unsigned int NUM_PREDEF_SUBMODULE_IDS = 1;
166 
167  /// \brief Source range/offset of a preprocessed entity.
168  struct PPEntityOffset {
169  /// \brief Raw source location of beginning of range.
170  unsigned Begin;
171  /// \brief Raw source location of end of range.
172  unsigned End;
173  /// \brief Offset in the AST file.
174  uint32_t BitOffset;
175 
177  : Begin(R.getBegin().getRawEncoding()),
178  End(R.getEnd().getRawEncoding()),
179  BitOffset(BitOffset) { }
180  };
181 
182  /// \brief Source range/offset of a preprocessed entity.
183  struct DeclOffset {
184  /// \brief Raw source location.
185  unsigned Loc;
186  /// \brief Offset in the AST file.
187  uint32_t BitOffset;
188 
189  DeclOffset() : Loc(0), BitOffset(0) { }
191  : Loc(Loc.getRawEncoding()),
192  BitOffset(BitOffset) { }
194  Loc = L.getRawEncoding();
195  }
196  };
197 
198  /// \brief The number of predefined preprocessed entity IDs.
199  const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1;
200 
201  /// \brief Describes the various kinds of blocks that occur within
202  /// an AST file.
203  enum BlockIDs {
204  /// \brief The AST block, which acts as a container around the
205  /// full AST block.
206  AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
207 
208  /// \brief The block containing information about the source
209  /// manager.
211 
212  /// \brief The block containing information about the
213  /// preprocessor.
215 
216  /// \brief The block containing the definitions of all of the
217  /// types and decls used within the AST file.
219 
220  /// \brief The block containing the detailed preprocessing record.
222 
223  /// \brief The block containing the submodule structure.
225 
226  /// \brief The block containing comments.
228 
229  /// \brief The control block, which contains all of the
230  /// information that needs to be validated prior to committing
231  /// to loading the AST file.
233 
234  /// \brief The block of input files, which were used as inputs
235  /// to create this AST file.
236  ///
237  /// This block is part of the control block.
239  };
240 
241  /// \brief Record types that occur within the control block.
243  /// \brief AST file metadata, including the AST file version number
244  /// and information about the compiler used to build this AST file.
245  METADATA = 1,
246 
247  /// \brief Record code for the list of other AST files imported by
248  /// this AST file.
249  IMPORTS = 2,
250 
251  /// \brief Record code for the language options table.
252  ///
253  /// The record with this code contains the contents of the
254  /// LangOptions structure. We serialize the entire contents of
255  /// the structure, and let the reader decide which options are
256  /// actually important to check.
258 
259  /// \brief Record code for the target options table.
261 
262  /// \brief Record code for the original file that was used to
263  /// generate the AST file, including both its file ID and its
264  /// name.
266 
267  /// \brief The directory that the PCH was originally created in.
269 
270  /// \brief Record code for file ID of the file or buffer that was used to
271  /// generate the AST file.
273 
274  /// \brief Offsets into the input-files block where input files
275  /// reside.
277 
278  /// \brief Record code for the diagnostic options table.
280 
281  /// \brief Record code for the filesystem options table.
283 
284  /// \brief Record code for the headers search options table.
286 
287  /// \brief Record code for the preprocessor options table.
289 
290  /// \brief Record code for the module name.
292 
293  /// \brief Record code for the module map file that was used to build this
294  /// AST file.
296 
297  /// \brief Record code for the signature that identifiers this AST file.
298  SIGNATURE = 15,
299 
300  /// \brief Record code for the module build directory.
302 
303  /// \brief Record code for the list of other AST files made available by
304  /// this AST file but not actually used by it.
306  };
307 
308  /// \brief Record types that occur within the input-files block
309  /// inside the control block.
311  /// \brief An input file.
313  };
314 
315  /// \brief Record types that occur within the AST block itself.
317  /// \brief Record code for the offsets of each type.
318  ///
319  /// The TYPE_OFFSET constant describes the record that occurs
320  /// within the AST block. The record itself is an array of offsets that
321  /// point into the declarations and types block (identified by
322  /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
323  /// of a type. For a given type ID @c T, the lower three bits of
324  /// @c T are its qualifiers (const, volatile, restrict), as in
325  /// the QualType class. The upper bits, after being shifted and
326  /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
327  /// TYPE_OFFSET block to determine the offset of that type's
328  /// corresponding record within the DECLTYPES_BLOCK_ID block.
330 
331  /// \brief Record code for the offsets of each decl.
332  ///
333  /// The DECL_OFFSET constant describes the record that occurs
334  /// within the block identified by DECL_OFFSETS_BLOCK_ID within
335  /// the AST block. The record itself is an array of offsets that
336  /// point into the declarations and types block (identified by
337  /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
338  /// record, after subtracting one to account for the use of
339  /// declaration ID 0 for a NULL declaration pointer. Index 0 is
340  /// reserved for the translation unit declaration.
342 
343  /// \brief Record code for the table of offsets of each
344  /// identifier ID.
345  ///
346  /// The offset table contains offsets into the blob stored in
347  /// the IDENTIFIER_TABLE record. Each offset points to the
348  /// NULL-terminated string that corresponds to that identifier.
350 
351  /// \brief This is so that older clang versions, before the introduction
352  /// of the control block, can read and reject the newer PCH format.
353  /// *DON"T CHANGE THIS NUMBER*.
355 
356  /// \brief Record code for the identifier table.
357  ///
358  /// The identifier table is a simple blob that contains
359  /// NULL-terminated strings for all of the identifiers
360  /// referenced by the AST file. The IDENTIFIER_OFFSET table
361  /// contains the mapping from identifier IDs to the characters
362  /// in this blob. Note that the starting offsets of all of the
363  /// identifiers are odd, so that, when the identifier offset
364  /// table is loaded in, we can use the low bit to distinguish
365  /// between offsets (for unresolved identifier IDs) and
366  /// IdentifierInfo pointers (for already-resolved identifier
367  /// IDs).
369 
370  /// \brief Record code for the array of eagerly deserialized decls.
371  ///
372  /// The AST file contains a list of all of the declarations that should be
373  /// eagerly deserialized present within the parsed headers, stored as an
374  /// array of declaration IDs. These declarations will be
375  /// reported to the AST consumer after the AST file has been
376  /// read, since their presence can affect the semantics of the
377  /// program (e.g., for code generation).
379 
380  /// \brief Record code for the set of non-builtin, special
381  /// types.
382  ///
383  /// This record contains the type IDs for the various type nodes
384  /// that are constructed during semantic analysis (e.g.,
385  /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
386  /// offsets into this record.
388 
389  /// \brief Record code for the extra statistics we gather while
390  /// generating an AST file.
392 
393  /// \brief Record code for the array of tentative definitions.
395 
396  // ID 10 used to be for a list of extern "C" declarations.
397 
398  /// \brief Record code for the table of offsets into the
399  /// Objective-C method pool.
401 
402  /// \brief Record code for the Objective-C method pool,
404 
405  /// \brief The value of the next __COUNTER__ to dispense.
406  /// [PP_COUNTER_VALUE, Val]
408 
409  /// \brief Record code for the table of offsets into the block
410  /// of source-location information.
412 
413  /// \brief Record code for the set of source location entries
414  /// that need to be preloaded by the AST reader.
415  ///
416  /// This set contains the source location entry for the
417  /// predefines buffer and for any file entries that need to be
418  /// preloaded.
420 
421  /// \brief Record code for the set of ext_vector type names.
423 
424  /// \brief Record code for the array of unused file scoped decls.
426 
427  /// \brief Record code for the table of offsets to entries in the
428  /// preprocessing record.
430 
431  /// \brief Record code for the array of VTable uses.
433 
434  // ID 20 used to be for a list of dynamic classes.
435 
436  /// \brief Record code for referenced selector pool.
438 
439  /// \brief Record code for an update to the TU's lexically contained
440  /// declarations.
442 
443  /// \brief Record code for the array describing the locations (in the
444  /// LOCAL_REDECLARATIONS record) of the redeclaration chains, indexed by
445  /// the first known ID.
447 
448  /// \brief Record code for declarations that Sema keeps references of.
450 
451  /// \brief Record code for weak undeclared identifiers.
453 
454  /// \brief Record code for pending implicit instantiations.
456 
457  /// \brief Record code for a decl replacement block.
458  ///
459  /// If a declaration is modified after having been deserialized, and then
460  /// written to a dependent AST file, its ID and offset must be added to
461  /// the replacement block.
463 
464  /// \brief Record code for an update to a decl context's lookup table.
465  ///
466  /// In practice, this should only be used for the TU and namespaces.
468 
469  /// \brief Record for offsets of DECL_UPDATES records for declarations
470  /// that were modified after being deserialized and need updates.
472 
473  /// \brief Record of updates for a declaration that was modified after
474  /// being deserialized.
476 
477  /// \brief Record code for the table of offsets to CXXBaseSpecifier
478  /// sets.
480 
481  /// \brief Record code for \#pragma diagnostic mappings.
483 
484  /// \brief Record code for special CUDA declarations.
486 
487  /// \brief Record code for header search information.
489 
490  /// \brief Record code for floating point \#pragma options.
492 
493  /// \brief Record code for enabled OpenCL extensions.
495 
496  /// \brief The list of delegating constructor declarations.
498 
499  /// \brief Record code for the set of known namespaces, which are used
500  /// for typo correction.
502 
503  /// \brief Record code for the remapping information used to relate
504  /// loaded modules to the various offsets and IDs(e.g., source location
505  /// offests, declaration and type IDs) that are used in that module to
506  /// refer to other modules.
508 
509  /// \brief Record code for the source manager line table information,
510  /// which stores information about \#line directives.
512 
513  /// \brief Record code for map of Objective-C class definition IDs to the
514  /// ObjC categories in a module that are attached to that class.
516 
517  /// \brief Record code for a file sorted array of DeclIDs in a module.
519 
520  /// \brief Record code for an array of all of the (sub)modules that were
521  /// imported by the AST file.
523 
524  // ID 40 used to be a table of merged canonical declarations.
525 
526  /// \brief Record code for the array of redeclaration chains.
527  ///
528  /// This array can only be interpreted properly using the local
529  /// redeclarations map.
531 
532  /// \brief Record code for the array of Objective-C categories (including
533  /// extensions).
534  ///
535  /// This array can only be interpreted properly using the Objective-C
536  /// categories map.
538 
539  /// \brief Record code for the table of offsets of each macro ID.
540  ///
541  /// The offset table contains offsets into the blob stored in
542  /// the preprocessor block. Each offset points to the corresponding
543  /// macro definition.
545 
546  // ID 48 used to be a table of macros.
547 
548  /// \brief Record code for undefined but used functions and variables that
549  /// need a definition in this TU.
551 
552  /// \brief Record code for late parsed template functions.
554 
555  /// \brief Record code for \#pragma optimize options.
557 
558  /// \brief Record code for potentially unused local typedef names.
560 
561  /// \brief Record code for the table of offsets to CXXCtorInitializers
562  /// lists.
564 
565  /// \brief Delete expressions that will be analyzed later.
567  };
568 
569  /// \brief Record types used within a source manager block.
571  /// \brief Describes a source location entry (SLocEntry) for a
572  /// file.
574  /// \brief Describes a source location entry (SLocEntry) for a
575  /// buffer.
577  /// \brief Describes a blob that contains the data for a buffer
578  /// entry. This kind of record always directly follows a
579  /// SM_SLOC_BUFFER_ENTRY record or a SM_SLOC_FILE_ENTRY with an
580  /// overridden buffer.
582  /// \brief Describes a source location entry (SLocEntry) for a
583  /// macro expansion.
585  };
586 
587  /// \brief Record types used within a preprocessor block.
589  // The macros in the PP section are a PP_MACRO_* instance followed by a
590  // list of PP_TOKEN instances for each token in the definition.
591 
592  /// \brief An object-like macro definition.
593  /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
595 
596  /// \brief A function-like macro definition.
597  /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs,
598  /// IsGNUVarars, NumArgs, ArgIdentInfoID* ]
600 
601  /// \brief Describes one token.
602  /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
603  PP_TOKEN = 3,
604 
605  /// \brief The macro directives history for a particular identifier.
607 
608  /// \brief A macro directive exported by a module.
609  /// [PP_MODULE_MACRO, SubmoduleID, MacroID, (Overridden SubmoduleID)*]
611  };
612 
613  /// \brief Record types used within a preprocessor detail block.
615  /// \brief Describes a macro expansion within the preprocessing record.
617 
618  /// \brief Describes a macro definition within the preprocessing record.
620 
621  /// \brief Describes an inclusion directive within the preprocessing
622  /// record.
624  };
625 
626  /// \brief Record types used within a submodule description block.
628  /// \brief Metadata for submodules as a whole.
630  /// \brief Defines the major attributes of a submodule, including its
631  /// name and parent.
633  /// \brief Specifies the umbrella header used to create this module,
634  /// if any.
636  /// \brief Specifies a header that falls into this (sub)module.
638  /// \brief Specifies a top-level header that falls into this (sub)module.
640  /// \brief Specifies an umbrella directory.
642  /// \brief Specifies the submodules that are imported by this
643  /// submodule.
645  /// \brief Specifies the submodules that are re-exported from this
646  /// submodule.
648  /// \brief Specifies a required feature.
650  /// \brief Specifies a header that has been explicitly excluded
651  /// from this submodule.
653  /// \brief Specifies a library or framework to link against.
655  /// \brief Specifies a configuration macro for this module.
657  /// \brief Specifies a conflict with another module.
659  /// \brief Specifies a header that is private to this submodule.
661  /// \brief Specifies a header that is part of the module but must be
662  /// textually included.
664  /// \brief Specifies a header that is private to this submodule but
665  /// must be textually included.
667  };
668 
669  /// \brief Record types used within a comments block.
672  };
673 
674  /// \defgroup ASTAST AST file AST constants
675  ///
676  /// The constants in this group describe various components of the
677  /// abstract syntax tree within an AST file.
678  ///
679  /// @{
680 
681  /// \brief Predefined type IDs.
682  ///
683  /// These type IDs correspond to predefined types in the AST
684  /// context, such as built-in types (int) and special place-holder
685  /// types (the <overload> and <dependent> type markers). Such
686  /// types are never actually serialized, since they will be built
687  /// by the AST context when it is created.
689  /// \brief The NULL type.
691  /// \brief The void type.
693  /// \brief The 'bool' or '_Bool' type.
695  /// \brief The 'char' type, when it is unsigned.
697  /// \brief The 'unsigned char' type.
699  /// \brief The 'unsigned short' type.
701  /// \brief The 'unsigned int' type.
703  /// \brief The 'unsigned long' type.
705  /// \brief The 'unsigned long long' type.
707  /// \brief The 'char' type, when it is signed.
709  /// \brief The 'signed char' type.
711  /// \brief The C++ 'wchar_t' type.
713  /// \brief The (signed) 'short' type.
715  /// \brief The (signed) 'int' type.
717  /// \brief The (signed) 'long' type.
719  /// \brief The (signed) 'long long' type.
721  /// \brief The 'float' type.
723  /// \brief The 'double' type.
725  /// \brief The 'long double' type.
727  /// \brief The placeholder type for overloaded function sets.
729  /// \brief The placeholder type for dependent types.
731  /// \brief The '__uint128_t' type.
733  /// \brief The '__int128_t' type.
735  /// \brief The type of 'nullptr'.
737  /// \brief The C++ 'char16_t' type.
739  /// \brief The C++ 'char32_t' type.
741  /// \brief The ObjC 'id' type.
743  /// \brief The ObjC 'Class' type.
745  /// \brief The ObjC 'SEL' type.
747  /// \brief The 'unknown any' placeholder type.
749  /// \brief The placeholder type for bound member functions.
751  /// \brief The "auto" deduction type.
753  /// \brief The "auto &&" deduction type.
755  /// \brief The OpenCL 'half' / ARM NEON __fp16 type.
757  /// \brief ARC's unbridged-cast placeholder type.
759  /// \brief The pseudo-object placeholder type.
761  /// \brief The __va_list_tag placeholder type.
763  /// \brief The placeholder type for builtin functions.
765  /// \brief OpenCL 1d image type.
767  /// \brief OpenCL 1d image array type.
769  /// \brief OpenCL 1d image buffer type.
771  /// \brief OpenCL 2d image type.
773  /// \brief OpenCL 2d image array type.
775  /// \brief OpenCL 3d image type.
777  /// \brief OpenCL event type.
779  /// \brief OpenCL sampler type.
781  };
782 
783  /// \brief The number of predefined type IDs that are reserved for
784  /// the PREDEF_TYPE_* constants.
785  ///
786  /// Type IDs for non-predefined types will start at
787  /// NUM_PREDEF_TYPE_IDs.
788  const unsigned NUM_PREDEF_TYPE_IDS = 100;
789 
790  /// \brief Record codes for each kind of type.
791  ///
792  /// These constants describe the type records that can occur within a
793  /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
794  /// constant describes a record for a specific type class in the
795  /// AST.
796  enum TypeCode {
797  /// \brief An ExtQualType record.
799  /// \brief A ComplexType record.
801  /// \brief A PointerType record.
803  /// \brief A BlockPointerType record.
805  /// \brief An LValueReferenceType record.
807  /// \brief An RValueReferenceType record.
809  /// \brief A MemberPointerType record.
811  /// \brief A ConstantArrayType record.
813  /// \brief An IncompleteArrayType record.
815  /// \brief A VariableArrayType record.
817  /// \brief A VectorType record.
819  /// \brief An ExtVectorType record.
821  /// \brief A FunctionNoProtoType record.
823  /// \brief A FunctionProtoType record.
825  /// \brief A TypedefType record.
827  /// \brief A TypeOfExprType record.
829  /// \brief A TypeOfType record.
831  /// \brief A RecordType record.
833  /// \brief An EnumType record.
834  TYPE_ENUM = 20,
835  /// \brief An ObjCInterfaceType record.
837  /// \brief An ObjCObjectPointerType record.
839  /// \brief a DecltypeType record.
841  /// \brief An ElaboratedType record.
843  /// \brief A SubstTemplateTypeParmType record.
845  /// \brief An UnresolvedUsingType record.
847  /// \brief An InjectedClassNameType record.
849  /// \brief An ObjCObjectType record.
851  /// \brief An TemplateTypeParmType record.
853  /// \brief An TemplateSpecializationType record.
855  /// \brief A DependentNameType record.
857  /// \brief A DependentTemplateSpecializationType record.
859  /// \brief A DependentSizedArrayType record.
861  /// \brief A ParenType record.
863  /// \brief A PackExpansionType record.
865  /// \brief An AttributedType record.
867  /// \brief A SubstTemplateTypeParmPackType record.
869  /// \brief A AutoType record.
870  TYPE_AUTO = 38,
871  /// \brief A UnaryTransformType record.
873  /// \brief An AtomicType record.
875  /// \brief A DecayedType record.
877  /// \brief An AdjustedType record.
879  };
880 
881  /// \brief The type IDs for special types constructed by semantic
882  /// analysis.
883  ///
884  /// The constants in this enumeration are indices into the
885  /// SPECIAL_TYPES record.
887  /// \brief CFConstantString type
889  /// \brief C FILE typedef type
891  /// \brief C jmp_buf typedef type
893  /// \brief C sigjmp_buf typedef type
895  /// \brief Objective-C "id" redefinition type
897  /// \brief Objective-C "Class" redefinition type
899  /// \brief Objective-C "SEL" redefinition type
901  /// \brief C ucontext_t typedef type
903  };
904 
905  /// \brief The number of special type IDs.
906  const unsigned NumSpecialTypeIDs = 8;
907 
908  /// \brief Predefined declaration IDs.
909  ///
910  /// These declaration IDs correspond to predefined declarations in the AST
911  /// context, such as the NULL declaration ID. Such declarations are never
912  /// actually serialized, since they will be built by the AST context when
913  /// it is created.
915  /// \brief The NULL declaration.
917 
918  /// \brief The translation unit.
920 
921  /// \brief The Objective-C 'id' type.
923 
924  /// \brief The Objective-C 'SEL' type.
926 
927  /// \brief The Objective-C 'Class' type.
929 
930  /// \brief The Objective-C 'Protocol' type.
932 
933  /// \brief The signed 128-bit integer type.
935 
936  /// \brief The unsigned 128-bit integer type.
938 
939  /// \brief The internal 'instancetype' typedef.
941 
942  /// \brief The internal '__builtin_va_list' typedef.
944 
945  /// \brief The extern "C" context.
947  };
948 
949  /// \brief The number of declaration IDs that are predefined.
950  ///
951  /// For more information about predefined declarations, see the
952  /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants.
953  const unsigned int NUM_PREDEF_DECL_IDS = 11;
954 
955  /// \brief Record codes for each kind of declaration.
956  ///
957  /// These constants describe the declaration records that can occur within
958  /// a declarations block (identified by DECLS_BLOCK_ID). Each
959  /// constant describes a record for a specific declaration class
960  /// in the AST.
961  enum DeclCode {
962  /// \brief A TypedefDecl record.
964  /// \brief A TypeAliasDecl record.
966  /// \brief An EnumDecl record.
968  /// \brief A RecordDecl record.
970  /// \brief An EnumConstantDecl record.
972  /// \brief A FunctionDecl record.
974  /// \brief A ObjCMethodDecl record.
976  /// \brief A ObjCInterfaceDecl record.
978  /// \brief A ObjCProtocolDecl record.
980  /// \brief A ObjCIvarDecl record.
982  /// \brief A ObjCAtDefsFieldDecl record.
984  /// \brief A ObjCCategoryDecl record.
986  /// \brief A ObjCCategoryImplDecl record.
988  /// \brief A ObjCImplementationDecl record.
990  /// \brief A ObjCCompatibleAliasDecl record.
992  /// \brief A ObjCPropertyDecl record.
994  /// \brief A ObjCPropertyImplDecl record.
996  /// \brief A FieldDecl record.
998  /// \brief A MSPropertyDecl record.
1000  /// \brief A VarDecl record.
1002  /// \brief An ImplicitParamDecl record.
1004  /// \brief A ParmVarDecl record.
1006  /// \brief A FileScopeAsmDecl record.
1008  /// \brief A BlockDecl record.
1010  /// \brief A CapturedDecl record.
1012  /// \brief A record that stores the set of declarations that are
1013  /// lexically stored within a given DeclContext.
1014  ///
1015  /// The record itself is a blob that is an array of declaration IDs,
1016  /// in the order in which those declarations were added to the
1017  /// declaration context. This data is used when iterating over
1018  /// the contents of a DeclContext, e.g., via
1019  /// DeclContext::decls_begin() and DeclContext::decls_end().
1021  /// \brief A record that stores the set of declarations that are
1022  /// visible from a given DeclContext.
1023  ///
1024  /// The record itself stores a set of mappings, each of which
1025  /// associates a declaration name with one or more declaration
1026  /// IDs. This data is used when performing qualified name lookup
1027  /// into a DeclContext via DeclContext::lookup.
1029  /// \brief A LabelDecl record.
1031  /// \brief A NamespaceDecl record.
1033  /// \brief A NamespaceAliasDecl record.
1035  /// \brief A UsingDecl record.
1037  /// \brief A UsingShadowDecl record.
1039  /// \brief A UsingDirecitveDecl record.
1041  /// \brief An UnresolvedUsingValueDecl record.
1043  /// \brief An UnresolvedUsingTypenameDecl record.
1045  /// \brief A LinkageSpecDecl record.
1047  /// \brief A CXXRecordDecl record.
1049  /// \brief A CXXMethodDecl record.
1051  /// \brief A CXXConstructorDecl record.
1053  /// \brief A CXXDestructorDecl record.
1055  /// \brief A CXXConversionDecl record.
1057  /// \brief An AccessSpecDecl record.
1059 
1060  /// \brief A FriendDecl record.
1062  /// \brief A FriendTemplateDecl record.
1064  /// \brief A ClassTemplateDecl record.
1066  /// \brief A ClassTemplateSpecializationDecl record.
1068  /// \brief A ClassTemplatePartialSpecializationDecl record.
1070  /// \brief A VarTemplateDecl record.
1072  /// \brief A VarTemplateSpecializationDecl record.
1074  /// \brief A VarTemplatePartialSpecializationDecl record.
1076  /// \brief A FunctionTemplateDecl record.
1078  /// \brief A TemplateTypeParmDecl record.
1080  /// \brief A NonTypeTemplateParmDecl record.
1082  /// \brief A TemplateTemplateParmDecl record.
1084  /// \brief A TypeAliasTemplateDecl record.
1086  /// \brief A StaticAssertDecl record.
1088  /// \brief A record containing CXXBaseSpecifiers.
1090  /// \brief A record containing CXXCtorInitializers.
1092  /// \brief A IndirectFieldDecl record.
1094  /// \brief A NonTypeTemplateParmDecl record that stores an expanded
1095  /// non-type template parameter pack.
1097  /// \brief A TemplateTemplateParmDecl record that stores an expanded
1098  /// template template parameter pack.
1100  /// \brief A ClassScopeFunctionSpecializationDecl record a class scope
1101  /// function specialization. (Microsoft extension).
1103  /// \brief An ImportDecl recording a module import.
1105  /// \brief An OMPThreadPrivateDecl record.
1107  /// \brief An EmptyDecl record.
1109  /// \brief An ObjCTypeParamDecl record.
1111  };
1112 
1113  /// \brief Record codes for each kind of statement or expression.
1114  ///
1115  /// These constants describe the records that describe statements
1116  /// or expressions. These records occur within type and declarations
1117  /// block, so they begin with record values of 128. Each constant
1118  /// describes a record for a specific statement or expression class in the
1119  /// AST.
1120  enum StmtCode {
1121  /// \brief A marker record that indicates that we are at the end
1122  /// of an expression.
1123  STMT_STOP = 128,
1124  /// \brief A NULL expression.
1126  /// \brief A reference to a previously [de]serialized Stmt record.
1128  /// \brief A NullStmt record.
1130  /// \brief A CompoundStmt record.
1132  /// \brief A CaseStmt record.
1134  /// \brief A DefaultStmt record.
1136  /// \brief A LabelStmt record.
1138  /// \brief An AttributedStmt record.
1140  /// \brief An IfStmt record.
1142  /// \brief A SwitchStmt record.
1144  /// \brief A WhileStmt record.
1146  /// \brief A DoStmt record.
1148  /// \brief A ForStmt record.
1150  /// \brief A GotoStmt record.
1152  /// \brief An IndirectGotoStmt record.
1154  /// \brief A ContinueStmt record.
1156  /// \brief A BreakStmt record.
1158  /// \brief A ReturnStmt record.
1160  /// \brief A DeclStmt record.
1162  /// \brief A CapturedStmt record.
1164  /// \brief A GCC-style AsmStmt record.
1166  /// \brief A MS-style AsmStmt record.
1168  /// \brief A PredefinedExpr record.
1170  /// \brief A DeclRefExpr record.
1172  /// \brief An IntegerLiteral record.
1174  /// \brief A FloatingLiteral record.
1176  /// \brief An ImaginaryLiteral record.
1178  /// \brief A StringLiteral record.
1180  /// \brief A CharacterLiteral record.
1182  /// \brief A ParenExpr record.
1184  /// \brief A ParenListExpr record.
1186  /// \brief A UnaryOperator record.
1188  /// \brief An OffsetOfExpr record.
1190  /// \brief A SizefAlignOfExpr record.
1192  /// \brief An ArraySubscriptExpr record.
1194  /// \brief A CallExpr record.
1196  /// \brief A MemberExpr record.
1198  /// \brief A BinaryOperator record.
1200  /// \brief A CompoundAssignOperator record.
1202  /// \brief A ConditionOperator record.
1204  /// \brief An ImplicitCastExpr record.
1206  /// \brief A CStyleCastExpr record.
1208  /// \brief A CompoundLiteralExpr record.
1210  /// \brief An ExtVectorElementExpr record.
1212  /// \brief An InitListExpr record.
1214  /// \brief A DesignatedInitExpr record.
1216  /// \brief A DesignatedInitUpdateExpr record.
1218  /// \brief An ImplicitValueInitExpr record.
1220  /// \brief An NoInitExpr record.
1222  /// \brief A VAArgExpr record.
1224  /// \brief An AddrLabelExpr record.
1226  /// \brief A StmtExpr record.
1228  /// \brief A ChooseExpr record.
1230  /// \brief A GNUNullExpr record.
1232  /// \brief A ShuffleVectorExpr record.
1234  /// \brief A ConvertVectorExpr record.
1236  /// \brief BlockExpr
1238  /// \brief A GenericSelectionExpr record.
1240  /// \brief A PseudoObjectExpr record.
1242  /// \brief An AtomicExpr record.
1244 
1245  // Objective-C
1246 
1247  /// \brief An ObjCStringLiteral record.
1249 
1253 
1254 
1255  /// \brief An ObjCEncodeExpr record.
1257  /// \brief An ObjCSelectorExpr record.
1259  /// \brief An ObjCProtocolExpr record.
1261  /// \brief An ObjCIvarRefExpr record.
1263  /// \brief An ObjCPropertyRefExpr record.
1265  /// \brief An ObjCSubscriptRefExpr record.
1267  /// \brief UNUSED
1269  /// \brief An ObjCMessageExpr record.
1271  /// \brief An ObjCIsa Expr record.
1273  /// \brief An ObjCIndirectCopyRestoreExpr record.
1275 
1276  /// \brief An ObjCForCollectionStmt record.
1278  /// \brief An ObjCAtCatchStmt record.
1280  /// \brief An ObjCAtFinallyStmt record.
1282  /// \brief An ObjCAtTryStmt record.
1284  /// \brief An ObjCAtSynchronizedStmt record.
1286  /// \brief An ObjCAtThrowStmt record.
1288  /// \brief An ObjCAutoreleasePoolStmt record.
1290  /// \brief A ObjCBoolLiteralExpr record.
1292 
1293  // C++
1294 
1295  /// \brief A CXXCatchStmt record.
1297  /// \brief A CXXTryStmt record.
1299  /// \brief A CXXForRangeStmt record.
1301 
1302  /// \brief A CXXOperatorCallExpr record.
1304  /// \brief A CXXMemberCallExpr record.
1306  /// \brief A CXXConstructExpr record.
1308  /// \brief A CXXTemporaryObjectExpr record.
1310  /// \brief A CXXStaticCastExpr record.
1312  /// \brief A CXXDynamicCastExpr record.
1314  /// \brief A CXXReinterpretCastExpr record.
1316  /// \brief A CXXConstCastExpr record.
1318  /// \brief A CXXFunctionalCastExpr record.
1320  /// \brief A UserDefinedLiteral record.
1322  /// \brief A CXXStdInitializerListExpr record.
1324  /// \brief A CXXBoolLiteralExpr record.
1326  EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr
1327  EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr).
1328  EXPR_CXX_TYPEID_TYPE, // CXXTypeidExpr (of type).
1329  EXPR_CXX_THIS, // CXXThisExpr
1330  EXPR_CXX_THROW, // CXXThrowExpr
1331  EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr
1332  EXPR_CXX_DEFAULT_INIT, // CXXDefaultInitExpr
1333  EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr
1334 
1335  EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
1336  EXPR_CXX_NEW, // CXXNewExpr
1337  EXPR_CXX_DELETE, // CXXDeleteExpr
1338  EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
1339 
1340  EXPR_EXPR_WITH_CLEANUPS, // ExprWithCleanups
1341 
1342  EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr
1343  EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
1344  EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr
1345  EXPR_CXX_UNRESOLVED_MEMBER, // UnresolvedMemberExpr
1346  EXPR_CXX_UNRESOLVED_LOOKUP, // UnresolvedLookupExpr
1347 
1348  EXPR_CXX_EXPRESSION_TRAIT, // ExpressionTraitExpr
1349  EXPR_CXX_NOEXCEPT, // CXXNoexceptExpr
1350 
1351  EXPR_OPAQUE_VALUE, // OpaqueValueExpr
1352  EXPR_BINARY_CONDITIONAL_OPERATOR, // BinaryConditionalOperator
1353  EXPR_TYPE_TRAIT, // TypeTraitExpr
1354  EXPR_ARRAY_TYPE_TRAIT, // ArrayTypeTraitIntExpr
1355 
1356  EXPR_PACK_EXPANSION, // PackExpansionExpr
1357  EXPR_SIZEOF_PACK, // SizeOfPackExpr
1358  EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, // SubstNonTypeTemplateParmExpr
1359  EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr
1360  EXPR_FUNCTION_PARM_PACK, // FunctionParmPackExpr
1361  EXPR_MATERIALIZE_TEMPORARY, // MaterializeTemporaryExpr
1362  EXPR_CXX_FOLD, // CXXFoldExpr
1363 
1364  // CUDA
1365  EXPR_CUDA_KERNEL_CALL, // CUDAKernelCallExpr
1366 
1367  // OpenCL
1368  EXPR_ASTYPE, // AsTypeExpr
1369 
1370  // Microsoft
1371  EXPR_CXX_PROPERTY_REF_EXPR, // MSPropertyRefExpr
1372  EXPR_CXX_UUIDOF_EXPR, // CXXUuidofExpr (of expr).
1373  EXPR_CXX_UUIDOF_TYPE, // CXXUuidofExpr (of type).
1374  STMT_SEH_LEAVE, // SEHLeaveStmt
1375  STMT_SEH_EXCEPT, // SEHExceptStmt
1376  STMT_SEH_FINALLY, // SEHFinallyStmt
1377  STMT_SEH_TRY, // SEHTryStmt
1378 
1379  // OpenMP directives
1404 
1405  // ARC
1406  EXPR_OBJC_BRIDGED_CAST, // ObjCBridgedCastExpr
1407 
1408  STMT_MS_DEPENDENT_EXISTS, // MSDependentExistsStmt
1409  EXPR_LAMBDA // LambdaExpr
1410  };
1411 
1412  /// \brief The kinds of designators that can occur in a
1413  /// DesignatedInitExpr.
1415  /// \brief Field designator where only the field name is known.
1417  /// \brief Field designator where the field has been resolved to
1418  /// a declaration.
1420  /// \brief Array designator.
1422  /// \brief GNU array range designator.
1424  };
1425 
1426  /// \brief The different kinds of data that can occur in a
1427  /// CtorInitializer.
1433  };
1434 
1435  /// \brief Describes the redeclarations of a declaration.
1437  DeclID FirstID; // The ID of the first declaration
1438  unsigned Offset; // Offset into the array of redeclaration chains.
1439 
1441  const LocalRedeclarationsInfo &Y) {
1442  return X.FirstID < Y.FirstID;
1443  }
1444 
1446  const LocalRedeclarationsInfo &Y) {
1447  return X.FirstID > Y.FirstID;
1448  }
1449 
1451  const LocalRedeclarationsInfo &Y) {
1452  return X.FirstID <= Y.FirstID;
1453  }
1454 
1456  const LocalRedeclarationsInfo &Y) {
1457  return X.FirstID >= Y.FirstID;
1458  }
1459  };
1460 
1461  /// \brief Describes the categories of an Objective-C class.
1463  DeclID DefinitionID; // The ID of the definition
1464  unsigned Offset; // Offset into the array of category lists.
1465 
1466  friend bool operator<(const ObjCCategoriesInfo &X,
1467  const ObjCCategoriesInfo &Y) {
1468  return X.DefinitionID < Y.DefinitionID;
1469  }
1470 
1471  friend bool operator>(const ObjCCategoriesInfo &X,
1472  const ObjCCategoriesInfo &Y) {
1473  return X.DefinitionID > Y.DefinitionID;
1474  }
1475 
1476  friend bool operator<=(const ObjCCategoriesInfo &X,
1477  const ObjCCategoriesInfo &Y) {
1478  return X.DefinitionID <= Y.DefinitionID;
1479  }
1480 
1481  friend bool operator>=(const ObjCCategoriesInfo &X,
1482  const ObjCCategoriesInfo &Y) {
1483  return X.DefinitionID >= Y.DefinitionID;
1484  }
1485  };
1486 
1487  /// @}
1488  }
1489 } // end namespace clang
1490 
1491 #endif
A PredefinedExpr record.
Definition: ASTBitCodes.h:1169
A FriendTemplateDecl record.
Definition: ASTBitCodes.h:1063
A CompoundLiteralExpr record.
Definition: ASTBitCodes.h:1209
A NonTypeTemplateParmDecl record.
Definition: ASTBitCodes.h:1081
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
Definition: ASTBitCodes.h:1414
BlockIDs
Describes the various kinds of blocks that occur within an AST file.
Definition: ASTBitCodes.h:203
Source range/offset of a preprocessed entity.
Definition: ASTBitCodes.h:168
Record code for the signature that identifiers this AST file.
Definition: ASTBitCodes.h:298
Record code for potentially unused local typedef names.
Definition: ASTBitCodes.h:559
Record code for map of Objective-C class definition IDs to the ObjC categories in a module that are a...
Definition: ASTBitCodes.h:515
An IndirectGotoStmt record.
Definition: ASTBitCodes.h:1153
A PointerType record.
Definition: ASTBitCodes.h:802
CtorInitializerType
The different kinds of data that can occur in a CtorInitializer.
Definition: ASTBitCodes.h:1428
An AddrLabelExpr record.
Definition: ASTBitCodes.h:1225
The macro directives history for a particular identifier.
Definition: ASTBitCodes.h:606
A TypedefDecl record.
Definition: ASTBitCodes.h:963
The (signed) 'long long' type.
Definition: ASTBitCodes.h:720
A CXXStaticCastExpr record.
Definition: ASTBitCodes.h:1311
Record code for the source manager line table information, which stores information about #line direc...
Definition: ASTBitCodes.h:511
An AttributedStmt record.
Definition: ASTBitCodes.h:1139
A CXXReinterpretCastExpr record.
Definition: ASTBitCodes.h:1315
The 'bool' or '_Bool' type.
Definition: ASTBitCodes.h:694
An OMPThreadPrivateDecl record.
Definition: ASTBitCodes.h:1106
A ObjCBoolLiteralExpr record.
Definition: ASTBitCodes.h:1291
const unsigned NUM_PREDEF_TYPE_IDS
The number of predefined type IDs that are reserved for the PREDEF_TYPE_* constants.
Definition: ASTBitCodes.h:788
friend bool operator>(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
Definition: ASTBitCodes.h:1445
ControlRecordTypes
Record types that occur within the control block.
Definition: ASTBitCodes.h:242
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
Definition: ASTBitCodes.h:125
The 'unknown any' placeholder type.
Definition: ASTBitCodes.h:748
An ImplicitValueInitExpr record.
Definition: ASTBitCodes.h:1219
SourceManagerRecordTypes
Record types used within a source manager block.
Definition: ASTBitCodes.h:570
const unsigned int NUM_PREDEF_SELECTOR_IDS
The number of predefined selector IDs.
Definition: ASTBitCodes.h:147
An ImplicitCastExpr record.
Definition: ASTBitCodes.h:1205
A VarTemplatePartialSpecializationDecl record.
Definition: ASTBitCodes.h:1075
unsigned Begin
Raw source location of beginning of range.
Definition: ASTBitCodes.h:170
Describes a source location entry (SLocEntry) for a macro expansion.
Definition: ASTBitCodes.h:584
An LValueReferenceType record.
Definition: ASTBitCodes.h:806
The placeholder type for builtin functions.
Definition: ASTBitCodes.h:764
A CXXOperatorCallExpr record.
Definition: ASTBitCodes.h:1303
Specifies the submodules that are imported by this submodule.
Definition: ASTBitCodes.h:644
A record that stores the set of declarations that are lexically stored within a given DeclContext...
Definition: ASTBitCodes.h:1020
Specifies an umbrella directory.
Definition: ASTBitCodes.h:641
A CXXTemporaryObjectExpr record.
Definition: ASTBitCodes.h:1309
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
Definition: ASTBitCodes.h:62
A SubstTemplateTypeParmType record.
Definition: ASTBitCodes.h:844
A ObjCPropertyDecl record.
Definition: ASTBitCodes.h:993
Record code for enabled OpenCL extensions.
Definition: ASTBitCodes.h:494
Record code for the module build directory.
Definition: ASTBitCodes.h:301
An ElaboratedType record.
Definition: ASTBitCodes.h:842
An UnresolvedUsingType record.
Definition: ASTBitCodes.h:846
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
An IncompleteArrayType record.
Definition: ASTBitCodes.h:814
Specifies a header that is part of the module but must be textually included.
Definition: ASTBitCodes.h:663
ARC's unbridged-cast placeholder type.
Definition: ASTBitCodes.h:758
A ClassTemplateDecl record.
Definition: ASTBitCodes.h:1065
void * getAsOpaquePtr() const
Definition: Type.h:614
An UnresolvedUsingTypenameDecl record.
Definition: ASTBitCodes.h:1044
uint32_t IdentifierID
An ID number that refers to an identifier in an AST file.
Definition: ASTBitCodes.h:54
The internal '__builtin_va_list' typedef.
Definition: ASTBitCodes.h:943
friend bool operator<(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
Definition: ASTBitCodes.h:1466
A UsingShadowDecl record.
Definition: ASTBitCodes.h:1038
const unsigned int NUM_PREDEF_DECL_IDS
The number of declaration IDs that are predefined.
Definition: ASTBitCodes.h:953
The value of the next COUNTER to dispense. [PP_COUNTER_VALUE, Val].
Definition: ASTBitCodes.h:407
A TemplateTemplateParmDecl record that stores an expanded template template parameter pack...
Definition: ASTBitCodes.h:1099
Specifies the umbrella header used to create this module, if any.
Definition: ASTBitCodes.h:635
Record code for header search information.
Definition: ASTBitCodes.h:488
Describes a source location entry (SLocEntry) for a buffer.
Definition: ASTBitCodes.h:576
A CXXConstructExpr record.
Definition: ASTBitCodes.h:1307
A TemplateTemplateParmDecl record.
Definition: ASTBitCodes.h:1083
Record code for the array of eagerly deserialized decls.
Definition: ASTBitCodes.h:378
A ObjCInterfaceDecl record.
Definition: ASTBitCodes.h:977
Record code for the array of redeclaration chains.
Definition: ASTBitCodes.h:530
A ShuffleVectorExpr record.
Definition: ASTBitCodes.h:1233
const unsigned VERSION_MAJOR
AST file major version number supported by this version of Clang.
Definition: ASTBitCodes.h:38
An OffsetOfExpr record.
Definition: ASTBitCodes.h:1189
A macro directive exported by a module. [PP_MODULE_MACRO, SubmoduleID, MacroID, (Overridden Submodule...
Definition: ASTBitCodes.h:610
An ObjCAtThrowStmt record.
Definition: ASTBitCodes.h:1287
Specifies a top-level header that falls into this (sub)module.
Definition: ASTBitCodes.h:639
The block containing comments.
Definition: ASTBitCodes.h:227
A DesignatedInitExpr record.
Definition: ASTBitCodes.h:1215
The 'char' type, when it is signed.
Definition: ASTBitCodes.h:708
Specifies a header that has been explicitly excluded from this submodule.
Definition: ASTBitCodes.h:652
SpecialTypeIDs
The type IDs for special types constructed by semantic analysis.
Definition: ASTBitCodes.h:886
friend bool operator<=(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
Definition: ASTBitCodes.h:1476
The unsigned 128-bit integer type.
Definition: ASTBitCodes.h:937
Record code for the module map file that was used to build this AST file.
Definition: ASTBitCodes.h:295
An ExtVectorType record.
Definition: ASTBitCodes.h:820
Delete expressions that will be analyzed later.
Definition: ASTBitCodes.h:566
An AttributedType record.
Definition: ASTBitCodes.h:866
An object-like macro definition. [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed].
Definition: ASTBitCodes.h:594
Describes one token. [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags].
Definition: ASTBitCodes.h:603
An AdjustedType record.
Definition: ASTBitCodes.h:878
Record code for the diagnostic options table.
Definition: ASTBitCodes.h:279
A IndirectFieldDecl record.
Definition: ASTBitCodes.h:1093
Record code for the set of ext_vector type names.
Definition: ASTBitCodes.h:422
Record code for the headers search options table.
Definition: ASTBitCodes.h:285
Specifies the submodules that are re-exported from this submodule.
Definition: ASTBitCodes.h:647
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
Definition: ASTBitCodes.h:162
An AccessSpecDecl record.
Definition: ASTBitCodes.h:1058
const unsigned NumSpecialTypeIDs
The number of special type IDs.
Definition: ASTBitCodes.h:906
Describes a blob that contains the data for a buffer entry. This kind of record always directly follo...
Definition: ASTBitCodes.h:581
Specifies a conflict with another module.
Definition: ASTBitCodes.h:658
The signed 128-bit integer type.
Definition: ASTBitCodes.h:934
A UnaryTransformType record.
Definition: ASTBitCodes.h:872
A reference to a previously [de]serialized Stmt record.
Definition: ASTBitCodes.h:1127
A UsingDirecitveDecl record.
Definition: ASTBitCodes.h:1040
An ObjCObjectType record.
Definition: ASTBitCodes.h:850
A ConstantArrayType record.
Definition: ASTBitCodes.h:812
Record code for #pragma optimize options.
Definition: ASTBitCodes.h:556
uint32_t BitOffset
Offset in the AST file.
Definition: ASTBitCodes.h:174
Specifies a header that is private to this submodule but must be textually included.
Definition: ASTBitCodes.h:666
Record code for pending implicit instantiations.
Definition: ASTBitCodes.h:455
uint32_t GlobalMacroID
A global ID number that refers to a macro in an AST file.
Definition: ASTBitCodes.h:134
Record code for #pragma diagnostic mappings.
Definition: ASTBitCodes.h:482
An ExtQualType record.
Definition: ASTBitCodes.h:798
Record code for floating point #pragma options.
Definition: ASTBitCodes.h:491
CommentRecordTypes
Record types used within a comments block.
Definition: ASTBitCodes.h:670
Record code for the set of known namespaces, which are used for typo correction.
Definition: ASTBitCodes.h:501
Record code for an array of all of the (sub)modules that were imported by the AST file...
Definition: ASTBitCodes.h:522
A marker record that indicates that we are at the end of an expression.
Definition: ASTBitCodes.h:1123
A ClassTemplateSpecializationDecl record.
Definition: ASTBitCodes.h:1067
A BlockPointerType record.
Definition: ASTBitCodes.h:804
A MemberPointerType record.
Definition: ASTBitCodes.h:810
Record code for the table of offsets into the block of source-location information.
Definition: ASTBitCodes.h:411
std::pair< uint32_t, DeclID > KindDeclIDPair
a Decl::Kind/DeclID pair.
Definition: ASTBitCodes.h:65
A SubstTemplateTypeParmPackType record.
Definition: ASTBitCodes.h:868
Objective-C "id" redefinition type.
Definition: ASTBitCodes.h:896
TypeCode
Record codes for each kind of type.
Definition: ASTBitCodes.h:796
PPEntityOffset(SourceRange R, uint32_t BitOffset)
Definition: ASTBitCodes.h:176
The block containing information about the source manager.
Definition: ASTBitCodes.h:210
Record code for the array describing the locations (in the LOCAL_REDECLARATIONS record) of the redecl...
Definition: ASTBitCodes.h:446
A VariableArrayType record.
Definition: ASTBitCodes.h:816
const unsigned int NUM_PREDEF_PP_ENTITY_IDS
The number of predefined preprocessed entity IDs.
Definition: ASTBitCodes.h:199
ASTRecordTypes
Record types that occur within the AST block itself.
Definition: ASTBitCodes.h:316
Defines the major attributes of a submodule, including its name and parent.
Definition: ASTBitCodes.h:632
friend bool operator>(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
Definition: ASTBitCodes.h:1471
Record code for the preprocessor options table.
Definition: ASTBitCodes.h:288
An EnumDecl record.
Definition: ASTBitCodes.h:967
A StaticAssertDecl record.
Definition: ASTBitCodes.h:1087
ID
Defines the set of possible language-specific address spaces.
Definition: AddressSpaces.h:27
A VarTemplateSpecializationDecl record.
Definition: ASTBitCodes.h:1073
Record code for the table of offsets of each macro ID.
Definition: ASTBitCodes.h:544
An ObjCTypeParamDecl record.
Definition: ASTBitCodes.h:1110
A record containing CXXBaseSpecifiers.
Definition: ASTBitCodes.h:1089
An TemplateSpecializationType record.
Definition: ASTBitCodes.h:854
An ObjCObjectPointerType record.
Definition: ASTBitCodes.h:838
An ObjCInterfaceType record.
Definition: ASTBitCodes.h:836
A ObjCCategoryImplDecl record.
Definition: ASTBitCodes.h:987
Record code for the array of VTable uses.
Definition: ASTBitCodes.h:432
The 'char' type, when it is unsigned.
Definition: ASTBitCodes.h:696
Record code for the target options table.
Definition: ASTBitCodes.h:260
The directory that the PCH was originally created in.
Definition: ASTBitCodes.h:268
A ObjCPropertyImplDecl record.
Definition: ASTBitCodes.h:995
The placeholder type for overloaded function sets.
Definition: ASTBitCodes.h:728
Record code for the table of offsets to entries in the preprocessing record.
Definition: ASTBitCodes.h:429
Field designator where only the field name is known.
Definition: ASTBitCodes.h:1416
uint32_t LocalMacroID
A local to a module ID number that refers to a macro in an AST file.
Definition: ASTBitCodes.h:138
A CXXConstructorDecl record.
Definition: ASTBitCodes.h:1052
The OpenCL 'half' / ARM NEON __fp16 type.
Definition: ASTBitCodes.h:756
The block containing the detailed preprocessing record.
Definition: ASTBitCodes.h:221
A CXXStdInitializerListExpr record.
Definition: ASTBitCodes.h:1323
A record containing CXXCtorInitializers.
Definition: ASTBitCodes.h:1091
A VarTemplateDecl record.
Definition: ASTBitCodes.h:1071
Record code for the original file that was used to generate the AST file, including both its file ID ...
Definition: ASTBitCodes.h:265
An ArraySubscriptExpr record.
Definition: ASTBitCodes.h:1193
A PseudoObjectExpr record.
Definition: ASTBitCodes.h:1241
A CXXDestructorDecl record.
Definition: ASTBitCodes.h:1054
A FunctionProtoType record.
Definition: ASTBitCodes.h:824
A NonTypeTemplateParmDecl record that stores an expanded non-type template parameter pack...
Definition: ASTBitCodes.h:1096
Describes a source location entry (SLocEntry) for a file.
Definition: ASTBitCodes.h:573
An ObjCIndirectCopyRestoreExpr record.
Definition: ASTBitCodes.h:1274
static bool isEqual(QualType A, QualType B)
Definition: ASTBitCodes.h:109
A NamespaceAliasDecl record.
Definition: ASTBitCodes.h:1034
Record code for an update to a decl context's lookup table.
Definition: ASTBitCodes.h:467
const unsigned VERSION_MINOR
AST file minor version number supported by this version of Clang.
Definition: ASTBitCodes.h:48
The width of the "fast" qualifier mask.
Definition: Type.h:156
friend bool operator>=(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
Definition: ASTBitCodes.h:1455
A DesignatedInitUpdateExpr record.
Definition: ASTBitCodes.h:1217
Record code for the filesystem options table.
Definition: ASTBitCodes.h:282
a DecltypeType record.
Definition: ASTBitCodes.h:840
friend bool operator<(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
Definition: ASTBitCodes.h:1440
An ImplicitParamDecl record.
Definition: ASTBitCodes.h:1003
An EnumConstantDecl record.
Definition: ASTBitCodes.h:971
Record code for the table of offsets of each identifier ID.
Definition: ASTBitCodes.h:349
Record code for undefined but used functions and variables that need a definition in this TU...
Definition: ASTBitCodes.h:550
A DependentNameType record.
Definition: ASTBitCodes.h:856
do v
Definition: arm_acle.h:77
An ImportDecl recording a module import.
Definition: ASTBitCodes.h:1104
A ObjCCategoryDecl record.
Definition: ASTBitCodes.h:985
An ObjCForCollectionStmt record.
Definition: ASTBitCodes.h:1277
Record code for the identifier table.
Definition: ASTBitCodes.h:368
A ObjCCompatibleAliasDecl record.
Definition: ASTBitCodes.h:991
The placeholder type for bound member functions.
Definition: ASTBitCodes.h:750
A MS-style AsmStmt record.
Definition: ASTBitCodes.h:1167
unsigned getLocalFastQualifiers() const
Definition: Type.h:596
friend bool operator>=(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
Definition: ASTBitCodes.h:1481
const unsigned int NUM_PREDEF_IDENT_IDS
The number of predefined identifier IDs.
Definition: ASTBitCodes.h:128
The 'unsigned long long' type.
Definition: ASTBitCodes.h:706
Record code for the set of source location entries that need to be preloaded by the AST reader...
Definition: ASTBitCodes.h:419
The list of delegating constructor declarations.
Definition: ASTBitCodes.h:497
An UnresolvedUsingValueDecl record.
Definition: ASTBitCodes.h:1042
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
Record code for the language options table.
Definition: ASTBitCodes.h:257
A record that stores the set of declarations that are visible from a given DeclContext.
Definition: ASTBitCodes.h:1028
Specifies a library or framework to link against.
Definition: ASTBitCodes.h:654
Record code for file ID of the file or buffer that was used to generate the AST file.
Definition: ASTBitCodes.h:272
Specifies a header that falls into this (sub)module.
Definition: ASTBitCodes.h:637
Record code for the table of offsets to CXXBaseSpecifier sets.
Definition: ASTBitCodes.h:479
A ComplexType record.
Definition: ASTBitCodes.h:800
Record code for special CUDA declarations.
Definition: ASTBitCodes.h:485
PredefinedTypeIDs
Predefined type IDs.
Definition: ASTBitCodes.h:688
This is so that older clang versions, before the introduction of the control block, can read and reject the newer PCH format. DON"T CHANGE THIS NUMBER.
Definition: ASTBitCodes.h:354
A CXXFunctionalCastExpr record.
Definition: ASTBitCodes.h:1319
Record code for the offsets of each decl.
Definition: ASTBitCodes.h:341
Metadata for submodules as a whole.
Definition: ASTBitCodes.h:629
An ObjCEncodeExpr record.
Definition: ASTBitCodes.h:1256
A TypeOfExprType record.
Definition: ASTBitCodes.h:828
Record code for late parsed template functions.
Definition: ASTBitCodes.h:553
A TemplateTypeParmDecl record.
Definition: ASTBitCodes.h:1079
A ObjCMethodDecl record.
Definition: ASTBitCodes.h:975
The internal 'instancetype' typedef.
Definition: ASTBitCodes.h:940
Describes the categories of an Objective-C class.
Definition: ASTBitCodes.h:1462
uint32_t MacroID
An ID number that refers to a macro in an AST file.
Definition: ASTBitCodes.h:131
The AST block, which acts as a container around the full AST block.
Definition: ASTBitCodes.h:206
Record code for the list of other AST files made available by this AST file but not actually used by ...
Definition: ASTBitCodes.h:305
An ObjCIsa Expr record.
Definition: ASTBitCodes.h:1272
The __va_list_tag placeholder type.
Definition: ASTBitCodes.h:762
SubmoduleRecordTypes
Record types used within a submodule description block.
Definition: ASTBitCodes.h:627
Objective-C "SEL" redefinition type.
Definition: ASTBitCodes.h:900
An InjectedClassNameType record.
Definition: ASTBitCodes.h:848
Record code for the extra statistics we gather while generating an AST file.
Definition: ASTBitCodes.h:391
A NamespaceDecl record.
Definition: ASTBitCodes.h:1032
An AtomicExpr record.
Definition: ASTBitCodes.h:1243
uint32_t BitOffset
Offset in the AST file.
Definition: ASTBitCodes.h:187
static QualType getFromOpaquePtr(const void *Ptr)
Definition: Type.h:615
Record code for referenced selector pool.
Definition: ASTBitCodes.h:437
Record code for the set of non-builtin, special types.
Definition: ASTBitCodes.h:387
A ObjCProtocolDecl record.
Definition: ASTBitCodes.h:979
friend bool operator<=(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
Definition: ASTBitCodes.h:1450
Record code for a decl replacement block.
Definition: ASTBitCodes.h:462
Record code for the list of other AST files imported by this AST file.
Definition: ASTBitCodes.h:249
A CXXConversionDecl record.
Definition: ASTBitCodes.h:1056
Describes a macro definition within the preprocessing record.
Definition: ASTBitCodes.h:619
Record code for the module name.
Definition: ASTBitCodes.h:291
An InitListExpr record.
Definition: ASTBitCodes.h:1213
Describes an inclusion directive within the preprocessing record.
Definition: ASTBitCodes.h:623
Record code for a file sorted array of DeclIDs in a module.
Definition: ASTBitCodes.h:518
A CXXBoolLiteralExpr record.
Definition: ASTBitCodes.h:1325
Record code for the array of Objective-C categories (including extensions).
Definition: ASTBitCodes.h:537
Specifies a configuration macro for this module.
Definition: ASTBitCodes.h:656
PreprocessorDetailRecordTypes
Record types used within a preprocessor detail block.
Definition: ASTBitCodes.h:614
An ExtVectorElementExpr record.
Definition: ASTBitCodes.h:1211
Record code for the array of unused file scoped decls.
Definition: ASTBitCodes.h:425
A FunctionNoProtoType record.
Definition: ASTBitCodes.h:822
A ClassTemplatePartialSpecializationDecl record.
Definition: ASTBitCodes.h:1069
DeclCode
Record codes for each kind of declaration.
Definition: ASTBitCodes.h:961
An ObjCAutoreleasePoolStmt record.
Definition: ASTBitCodes.h:1289
A ClassScopeFunctionSpecializationDecl record a class scope function specialization. (Microsoft extension).
Definition: ASTBitCodes.h:1102
Record code for the Objective-C method pool,.
Definition: ASTBitCodes.h:403
Record of updates for a declaration that was modified after being deserialized.
Definition: ASTBitCodes.h:475
A MSPropertyDecl record.
Definition: ASTBitCodes.h:999
Specifies a header that is private to this submodule.
Definition: ASTBitCodes.h:660
A LinkageSpecDecl record.
Definition: ASTBitCodes.h:1046
Describes a macro expansion within the preprocessing record.
Definition: ASTBitCodes.h:616
A CXXDynamicCastExpr record.
Definition: ASTBitCodes.h:1313
An EnumType record.
Definition: ASTBitCodes.h:834
An RValueReferenceType record.
Definition: ASTBitCodes.h:808
An AtomicType record.
Definition: ASTBitCodes.h:874
An ObjCAtFinallyStmt record.
Definition: ASTBitCodes.h:1281
uint32_t CXXCtorInitializersID
An ID number that refers to a list of CXXCtorInitializers in an AST file.
Definition: ASTBitCodes.h:155
The placeholder type for dependent types.
Definition: ASTBitCodes.h:730
TypeID asTypeID(unsigned FastQuals) const
Definition: ASTBitCodes.h:92
A FunctionDecl record.
Definition: ASTBitCodes.h:973
Record code for the table of offsets into the Objective-C method pool.
Definition: ASTBitCodes.h:400
A DependentSizedArrayType record.
Definition: ASTBitCodes.h:860
Record code for the remapping information used to relate loaded modules to the various offsets and ID...
Definition: ASTBitCodes.h:507
An ObjCAtSynchronizedStmt record.
Definition: ASTBitCodes.h:1285
Record code for declarations that Sema keeps references of.
Definition: ASTBitCodes.h:449
const unsigned int NUM_PREDEF_MACRO_IDS
The number of predefined macro IDs.
Definition: ASTBitCodes.h:141
Offsets into the input-files block where input files reside.
Definition: ASTBitCodes.h:276
A CXXMemberCallExpr record.
Definition: ASTBitCodes.h:1305
PreprocessorRecordTypes
Record types used within a preprocessor block.
Definition: ASTBitCodes.h:588
The block containing the submodule structure.
Definition: ASTBitCodes.h:224
void setLocation(SourceLocation L)
Definition: ASTBitCodes.h:193
A ConvertVectorExpr record.
Definition: ASTBitCodes.h:1235
unsigned End
Raw source location of end of range.
Definition: ASTBitCodes.h:172
A TypedefType record.
Definition: ASTBitCodes.h:826
X
Definition: SemaDecl.cpp:11429
DeclOffset(SourceLocation Loc, uint32_t BitOffset)
Definition: ASTBitCodes.h:190
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
Definition: ASTBitCodes.h:159
GNU array range designator.
Definition: ASTBitCodes.h:1423
A GCC-style AsmStmt record.
Definition: ASTBitCodes.h:1165
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
Definition: ASTBitCodes.h:144
An TemplateTypeParmType record.
Definition: ASTBitCodes.h:852
An ObjCAtCatchStmt record.
Definition: ASTBitCodes.h:1279
A ObjCImplementationDecl record.
Definition: ASTBitCodes.h:989
Field designator where the field has been resolved to a declaration.
Definition: ASTBitCodes.h:1419
A ObjCAtDefsFieldDecl record.
Definition: ASTBitCodes.h:983
Record code for the offsets of each type.
Definition: ASTBitCodes.h:329
The block containing the definitions of all of the types and decls used within the AST file...
Definition: ASTBitCodes.h:218
Record code for the table of offsets to CXXCtorInitializers lists.
Definition: ASTBitCodes.h:563
A TypeAliasDecl record.
Definition: ASTBitCodes.h:965
Describes the redeclarations of a declaration.
Definition: ASTBitCodes.h:1436
Specifies a required feature.
Definition: ASTBitCodes.h:649
uint32_t getIndex() const
Definition: ASTBitCodes.h:91
Record for offsets of DECL_UPDATES records for declarations that were modified after being deserializ...
Definition: ASTBitCodes.h:471
A FunctionTemplateDecl record.
Definition: ASTBitCodes.h:1077
A TypeAliasTemplateDecl record.
Definition: ASTBitCodes.h:1085
Record code for weak undeclared identifiers.
Definition: ASTBitCodes.h:452
The block containing information about the preprocessor.
Definition: ASTBitCodes.h:214
A DecayedType record.
Definition: ASTBitCodes.h:876
uint32_t TypeID
An ID number that refers to a type in an AST file.
Definition: ASTBitCodes.h:82
A trivial tuple used to represent a source range.
AST file metadata, including the AST file version number and information about the compiler used to b...
Definition: ASTBitCodes.h:245
uint32_t CXXBaseSpecifiersID
An ID number that refers to a set of CXXBaseSpecifiers in an AST file.
Definition: ASTBitCodes.h:151
The block of input files, which were used as inputs to create this AST file.
Definition: ASTBitCodes.h:238
static TypeIdx fromTypeID(TypeID ID)
Definition: ASTBitCodes.h:98
InputFileRecordTypes
Record types that occur within the input-files block inside the control block.
Definition: ASTBitCodes.h:310
A function-like macro definition. [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars, NumArgs, ArgIdentInfoID* ].
Definition: ASTBitCodes.h:599
The Objective-C 'Protocol' type.
Definition: ASTBitCodes.h:931
The control block, which contains all of the information that needs to be validated prior to committi...
Definition: ASTBitCodes.h:232
StmtCode
Record codes for each kind of statement or expression.
Definition: ASTBitCodes.h:1120
PredefinedDeclIDs
Predefined declaration IDs.
Definition: ASTBitCodes.h:914
Record code for an update to the TU's lexically contained declarations.
Definition: ASTBitCodes.h:441
Source range/offset of a preprocessed entity.
Definition: ASTBitCodes.h:183
A GenericSelectionExpr record.
Definition: ASTBitCodes.h:1239
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:85
unsigned Loc
Raw source location.
Definition: ASTBitCodes.h:185
Objective-C "Class" redefinition type.
Definition: ASTBitCodes.h:898
A PackExpansionType record.
Definition: ASTBitCodes.h:864
The pseudo-object placeholder type.
Definition: ASTBitCodes.h:760
const unsigned int NUM_PREDEF_SUBMODULE_IDS
The number of predefined submodule IDs.
Definition: ASTBitCodes.h:165
A DependentTemplateSpecializationType record.
Definition: ASTBitCodes.h:858
Record code for the array of tentative definitions.
Definition: ASTBitCodes.h:394