1 //===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This header defines Bitcode enum values for Clang serialized AST files.
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
16 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_CLANG_FRONTEND_PCHBITCODES_H
18 #define LLVM_CLANG_FRONTEND_PCHBITCODES_H
20 #include "clang/AST/Type.h"
21 #include "llvm/Bitcode/BitCodes.h"
22 #include "llvm/Support/DataTypes.h"
23 #include "llvm/ADT/DenseMap.h"
26 namespace serialization {
27 /// \brief AST file major version number supported by this version of
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.
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 = 4;
40 /// \brief AST file minor version number supported by this version of
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;
50 /// \brief An ID number that refers to a declaration in an AST file.
52 /// The ID numbers of declarations are consecutive (in order of
53 /// discovery) and start at 2. 0 is reserved for NULL, and 1 is
54 /// reserved for the translation unit declaration.
55 typedef uint32_t DeclID;
57 /// \brief a Decl::Kind/DeclID pair.
58 typedef std::pair<uint32_t, DeclID> KindDeclIDPair;
60 /// \brief An ID number that refers to a type in an AST file.
62 /// The ID of a type is partitioned into two parts: the lower
63 /// three bits are used to store the const/volatile/restrict
64 /// qualifiers (as with QualType) and the upper bits provide a
65 /// type index. The type index values are partitioned into two
66 /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
67 /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
68 /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
69 /// other types that have serialized representations.
70 typedef uint32_t TypeID;
72 /// \brief A type index; the type ID with the qualifier bits removed.
76 TypeIdx() : Idx(0) { }
77 explicit TypeIdx(uint32_t index) : Idx(index) { }
79 uint32_t getIndex() const { return Idx; }
80 TypeID asTypeID(unsigned FastQuals) const {
81 return (Idx << Qualifiers::FastWidth) | FastQuals;
83 static TypeIdx fromTypeID(TypeID ID) {
84 return TypeIdx(ID >> Qualifiers::FastWidth);
88 /// A structure for putting "fast"-unqualified QualTypes into a
89 /// DenseMap. This uses the standard pointer hash function.
90 struct UnsafeQualTypeDenseMapInfo {
91 static inline bool isEqual(QualType A, QualType B) { return A == B; }
92 static inline QualType getEmptyKey() {
93 return QualType::getFromOpaquePtr((void*) 1);
95 static inline QualType getTombstoneKey() {
96 return QualType::getFromOpaquePtr((void*) 2);
98 static inline unsigned getHashValue(QualType T) {
99 assert(!T.getLocalFastQualifiers() &&
100 "hash invalid for types with fast quals");
101 uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
102 return (unsigned(v) >> 4) ^ (unsigned(v) >> 9);
106 /// \brief Map that provides the ID numbers of each type within the
107 /// output stream, plus those deserialized from a chained PCH.
109 /// The ID numbers of types are consecutive (in order of discovery)
110 /// and start at 1. 0 is reserved for NULL. When types are actually
111 /// stored in the stream, the ID number is shifted by 2 bits to
112 /// allow for the const/volatile qualifiers.
114 /// Keys in the map never have const/volatile qualifiers.
115 typedef llvm::DenseMap<QualType, TypeIdx, UnsafeQualTypeDenseMapInfo>
118 /// \brief An ID number that refers to an identifier in an AST file.
119 typedef uint32_t IdentID;
121 /// \brief An ID number that refers to a macro in an AST file.
122 typedef uint32_t MacroID;
124 /// \brief An ID number that refers to an ObjC selctor in an AST file.
125 typedef uint32_t SelectorID;
127 /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an
129 typedef uint32_t CXXBaseSpecifiersID;
131 /// \brief Describes the various kinds of blocks that occur within
134 /// \brief The AST block, which acts as a container around the
136 AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
138 /// \brief The block containing information about the source
140 SOURCE_MANAGER_BLOCK_ID,
142 /// \brief The block containing information about the
144 PREPROCESSOR_BLOCK_ID,
146 /// \brief The block containing the definitions of all of the
147 /// types and decls used within the AST file.
150 /// \brief The block containing DECL_UPDATES records.
151 DECL_UPDATES_BLOCK_ID,
153 /// \brief The block containing the detailed preprocessing record.
154 PREPROCESSOR_DETAIL_BLOCK_ID
157 /// \brief Record types that occur within the AST block itself.
158 enum ASTRecordTypes {
159 /// \brief Record code for the offsets of each type.
161 /// The TYPE_OFFSET constant describes the record that occurs
162 /// within the AST block. The record itself is an array of offsets that
163 /// point into the declarations and types block (identified by
164 /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
165 /// of a type. For a given type ID @c T, the lower three bits of
166 /// @c T are its qualifiers (const, volatile, restrict), as in
167 /// the QualType class. The upper bits, after being shifted and
168 /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
169 /// TYPE_OFFSET block to determine the offset of that type's
170 /// corresponding record within the DECLTYPES_BLOCK_ID block.
173 /// \brief Record code for the offsets of each decl.
175 /// The DECL_OFFSET constant describes the record that occurs
176 /// within the block identified by DECL_OFFSETS_BLOCK_ID within
177 /// the AST block. The record itself is an array of offsets that
178 /// point into the declarations and types block (identified by
179 /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
180 /// record, after subtracting one to account for the use of
181 /// declaration ID 0 for a NULL declaration pointer. Index 0 is
182 /// reserved for the translation unit declaration.
185 /// \brief Record code for the language options table.
187 /// The record with this code contains the contents of the
188 /// LangOptions structure. We serialize the entire contents of
189 /// the structure, and let the reader decide which options are
190 /// actually important to check.
191 LANGUAGE_OPTIONS = 3,
193 /// \brief AST file metadata, including the AST file version number
194 /// and the target triple used to build the AST file.
197 /// \brief Record code for the table of offsets of each
200 /// The offset table contains offsets into the blob stored in
201 /// the IDENTIFIER_TABLE record. Each offset points to the
202 /// NULL-terminated string that corresponds to that identifier.
203 IDENTIFIER_OFFSET = 5,
205 /// \brief Record code for the identifier table.
207 /// The identifier table is a simple blob that contains
208 /// NULL-terminated strings for all of the identifiers
209 /// referenced by the AST file. The IDENTIFIER_OFFSET table
210 /// contains the mapping from identifier IDs to the characters
211 /// in this blob. Note that the starting offsets of all of the
212 /// identifiers are odd, so that, when the identifier offset
213 /// table is loaded in, we can use the low bit to distinguish
214 /// between offsets (for unresolved identifier IDs) and
215 /// IdentifierInfo pointers (for already-resolved identifier
217 IDENTIFIER_TABLE = 6,
219 /// \brief Record code for the array of external definitions.
221 /// The AST file contains a list of all of the unnamed external
222 /// definitions present within the parsed headers, stored as an
223 /// array of declaration IDs. These external definitions will be
224 /// reported to the AST consumer after the AST file has been
225 /// read, since their presence can affect the semantics of the
226 /// program (e.g., for code generation).
227 EXTERNAL_DEFINITIONS = 7,
229 /// \brief Record code for the set of non-builtin, special
232 /// This record contains the type IDs for the various type nodes
233 /// that are constructed during semantic analysis (e.g.,
234 /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
235 /// offsets into this record.
238 /// \brief Record code for the extra statistics we gather while
239 /// generating an AST file.
242 /// \brief Record code for the array of tentative definitions.
243 TENTATIVE_DEFINITIONS = 10,
245 /// \brief Record code for the array of locally-scoped external
247 LOCALLY_SCOPED_EXTERNAL_DECLS = 11,
249 /// \brief Record code for the table of offsets into the
250 /// Objective-C method pool.
251 SELECTOR_OFFSETS = 12,
253 /// \brief Record code for the Objective-C method pool,
256 /// \brief The value of the next __COUNTER__ to dispense.
257 /// [PP_COUNTER_VALUE, Val]
258 PP_COUNTER_VALUE = 14,
260 /// \brief Record code for the table of offsets into the block
261 /// of source-location information.
262 SOURCE_LOCATION_OFFSETS = 15,
264 /// \brief Record code for the set of source location entries
265 /// that need to be preloaded by the AST reader.
267 /// This set contains the source location entry for the
268 /// predefines buffer and for any file entries that need to be
270 SOURCE_LOCATION_PRELOADS = 16,
272 /// \brief Record code for the stat() cache.
275 /// \brief Record code for the set of ext_vector type names.
276 EXT_VECTOR_DECLS = 18,
278 /// \brief Record code for the original file that was used to
279 /// generate the AST file.
280 ORIGINAL_FILE_NAME = 19,
282 /// Record #20 intentionally left blank.
284 /// \brief Record code for the version control branch and revision
285 /// information of the compiler used to build this AST file.
286 VERSION_CONTROL_BRANCH_REVISION = 21,
288 /// \brief Record code for the array of unused file scoped decls.
289 UNUSED_FILESCOPED_DECLS = 22,
291 /// \brief Record code for the table of offsets to macro definition
292 /// entries in the preprocessing record.
293 MACRO_DEFINITION_OFFSETS = 23,
295 /// \brief Record code for the array of VTable uses.
298 /// \brief Record code for the array of dynamic classes.
299 DYNAMIC_CLASSES = 25,
301 /// \brief Record code for the chained AST metadata, including the
302 /// AST file version and the name of the PCH this depends on.
303 CHAINED_METADATA = 26,
305 /// \brief Record code for referenced selector pool.
306 REFERENCED_SELECTOR_POOL = 27,
308 /// \brief Record code for an update to the TU's lexically contained
310 TU_UPDATE_LEXICAL = 28,
312 /// \brief Record code for an update to first decls pointing to the
313 /// latest redeclarations.
314 REDECLS_UPDATE_LATEST = 29,
316 /// \brief Record code for declarations that Sema keeps references of.
319 /// \brief Record code for weak undeclared identifiers.
320 WEAK_UNDECLARED_IDENTIFIERS = 31,
322 /// \brief Record code for pending implicit instantiations.
323 PENDING_IMPLICIT_INSTANTIATIONS = 32,
325 /// \brief Record code for a decl replacement block.
327 /// If a declaration is modified after having been deserialized, and then
328 /// written to a dependent AST file, its ID and offset must be added to
329 /// the replacement block.
330 DECL_REPLACEMENTS = 33,
332 /// \brief Record code for an update to a decl context's lookup table.
334 /// In practice, this should only be used for the TU and namespaces.
337 /// \brief Record for offsets of DECL_UPDATES records for declarations
338 /// that were modified after being deserialized and need updates.
339 DECL_UPDATE_OFFSETS = 35,
341 /// \brief Record of updates for a declaration that was modified after
342 /// being deserialized.
345 /// \brief Record code for the table of offsets to CXXBaseSpecifier
347 CXX_BASE_SPECIFIER_OFFSETS = 37,
349 /// \brief Record code for #pragma diagnostic mappings.
350 DIAG_PRAGMA_MAPPINGS = 38,
352 /// \brief Record code for special CUDA declarations.
353 CUDA_SPECIAL_DECL_REFS = 39,
355 /// \brief Record code for header search information.
356 HEADER_SEARCH_TABLE = 40,
358 /// \brief The directory that the PCH was originally created in.
359 ORIGINAL_PCH_DIR = 41,
361 /// \brief Record code for floating point #pragma options.
362 FP_PRAGMA_OPTIONS = 42,
364 /// \brief Record code for enabled OpenCL extensions.
365 OPENCL_EXTENSIONS = 43
368 /// \brief Record types used within a source manager block.
369 enum SourceManagerRecordTypes {
370 /// \brief Describes a source location entry (SLocEntry) for a
372 SM_SLOC_FILE_ENTRY = 1,
373 /// \brief Describes a source location entry (SLocEntry) for a
375 SM_SLOC_BUFFER_ENTRY = 2,
376 /// \brief Describes a blob that contains the data for a buffer
377 /// entry. This kind of record always directly follows a
378 /// SM_SLOC_BUFFER_ENTRY record.
379 SM_SLOC_BUFFER_BLOB = 3,
380 /// \brief Describes a source location entry (SLocEntry) for a
381 /// macro instantiation.
382 SM_SLOC_INSTANTIATION_ENTRY = 4,
383 /// \brief Describes the SourceManager's line table, with
384 /// information about #line directives.
388 /// \brief Record types used within a preprocessor block.
389 enum PreprocessorRecordTypes {
390 // The macros in the PP section are a PP_MACRO_* instance followed by a
391 // list of PP_TOKEN instances for each token in the definition.
393 /// \brief An object-like macro definition.
394 /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
395 PP_MACRO_OBJECT_LIKE = 1,
397 /// \brief A function-like macro definition.
398 /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
399 /// NumArgs, ArgIdentInfoID* ]
400 PP_MACRO_FUNCTION_LIKE = 2,
402 /// \brief Describes one token.
403 /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
407 /// \brief Record types used within a preprocessor detail block.
408 enum PreprocessorDetailRecordTypes {
409 /// \brief Describes a macro instantiation within the preprocessing
411 PPD_MACRO_INSTANTIATION = 0,
413 /// \brief Describes a macro definition within the preprocessing record.
414 PPD_MACRO_DEFINITION = 1,
416 /// \brief Describes an inclusion directive within the preprocessing
418 PPD_INCLUSION_DIRECTIVE = 2
421 /// \defgroup ASTAST AST file AST constants
423 /// The constants in this group describe various components of the
424 /// abstract syntax tree within an AST file.
428 /// \brief Predefined type IDs.
430 /// These type IDs correspond to predefined types in the AST
431 /// context, such as built-in types (int) and special place-holder
432 /// types (the <overload> and <dependent> type markers). Such
433 /// types are never actually serialized, since they will be built
434 /// by the AST context when it is created.
435 enum PredefinedTypeIDs {
436 /// \brief The NULL type.
437 PREDEF_TYPE_NULL_ID = 0,
438 /// \brief The void type.
439 PREDEF_TYPE_VOID_ID = 1,
440 /// \brief The 'bool' or '_Bool' type.
441 PREDEF_TYPE_BOOL_ID = 2,
442 /// \brief The 'char' type, when it is unsigned.
443 PREDEF_TYPE_CHAR_U_ID = 3,
444 /// \brief The 'unsigned char' type.
445 PREDEF_TYPE_UCHAR_ID = 4,
446 /// \brief The 'unsigned short' type.
447 PREDEF_TYPE_USHORT_ID = 5,
448 /// \brief The 'unsigned int' type.
449 PREDEF_TYPE_UINT_ID = 6,
450 /// \brief The 'unsigned long' type.
451 PREDEF_TYPE_ULONG_ID = 7,
452 /// \brief The 'unsigned long long' type.
453 PREDEF_TYPE_ULONGLONG_ID = 8,
454 /// \brief The 'char' type, when it is signed.
455 PREDEF_TYPE_CHAR_S_ID = 9,
456 /// \brief The 'signed char' type.
457 PREDEF_TYPE_SCHAR_ID = 10,
458 /// \brief The C++ 'wchar_t' type.
459 PREDEF_TYPE_WCHAR_ID = 11,
460 /// \brief The (signed) 'short' type.
461 PREDEF_TYPE_SHORT_ID = 12,
462 /// \brief The (signed) 'int' type.
463 PREDEF_TYPE_INT_ID = 13,
464 /// \brief The (signed) 'long' type.
465 PREDEF_TYPE_LONG_ID = 14,
466 /// \brief The (signed) 'long long' type.
467 PREDEF_TYPE_LONGLONG_ID = 15,
468 /// \brief The 'float' type.
469 PREDEF_TYPE_FLOAT_ID = 16,
470 /// \brief The 'double' type.
471 PREDEF_TYPE_DOUBLE_ID = 17,
472 /// \brief The 'long double' type.
473 PREDEF_TYPE_LONGDOUBLE_ID = 18,
474 /// \brief The placeholder type for overloaded function sets.
475 PREDEF_TYPE_OVERLOAD_ID = 19,
476 /// \brief The placeholder type for dependent types.
477 PREDEF_TYPE_DEPENDENT_ID = 20,
478 /// \brief The '__uint128_t' type.
479 PREDEF_TYPE_UINT128_ID = 21,
480 /// \brief The '__int128_t' type.
481 PREDEF_TYPE_INT128_ID = 22,
482 /// \brief The type of 'nullptr'.
483 PREDEF_TYPE_NULLPTR_ID = 23,
484 /// \brief The C++ 'char16_t' type.
485 PREDEF_TYPE_CHAR16_ID = 24,
486 /// \brief The C++ 'char32_t' type.
487 PREDEF_TYPE_CHAR32_ID = 25,
488 /// \brief The ObjC 'id' type.
489 PREDEF_TYPE_OBJC_ID = 26,
490 /// \brief The ObjC 'Class' type.
491 PREDEF_TYPE_OBJC_CLASS = 27,
492 /// \brief The ObjC 'SEL' type.
493 PREDEF_TYPE_OBJC_SEL = 28
496 /// \brief The number of predefined type IDs that are reserved for
497 /// the PREDEF_TYPE_* constants.
499 /// Type IDs for non-predefined types will start at
500 /// NUM_PREDEF_TYPE_IDs.
501 const unsigned NUM_PREDEF_TYPE_IDS = 100;
503 /// \brief Record codes for each kind of type.
505 /// These constants describe the type records that can occur within a
506 /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
507 /// constant describes a record for a specific type class in the
510 /// \brief An ExtQualType record.
512 /// \brief A ComplexType record.
514 /// \brief A PointerType record.
516 /// \brief A BlockPointerType record.
517 TYPE_BLOCK_POINTER = 5,
518 /// \brief An LValueReferenceType record.
519 TYPE_LVALUE_REFERENCE = 6,
520 /// \brief An RValueReferenceType record.
521 TYPE_RVALUE_REFERENCE = 7,
522 /// \brief A MemberPointerType record.
523 TYPE_MEMBER_POINTER = 8,
524 /// \brief A ConstantArrayType record.
525 TYPE_CONSTANT_ARRAY = 9,
526 /// \brief An IncompleteArrayType record.
527 TYPE_INCOMPLETE_ARRAY = 10,
528 /// \brief A VariableArrayType record.
529 TYPE_VARIABLE_ARRAY = 11,
530 /// \brief A VectorType record.
532 /// \brief An ExtVectorType record.
533 TYPE_EXT_VECTOR = 13,
534 /// \brief A FunctionNoProtoType record.
535 TYPE_FUNCTION_NO_PROTO = 14,
536 /// \brief A FunctionProtoType record.
537 TYPE_FUNCTION_PROTO = 15,
538 /// \brief A TypedefType record.
540 /// \brief A TypeOfExprType record.
541 TYPE_TYPEOF_EXPR = 17,
542 /// \brief A TypeOfType record.
544 /// \brief A RecordType record.
546 /// \brief An EnumType record.
548 /// \brief An ObjCInterfaceType record.
549 TYPE_OBJC_INTERFACE = 21,
550 /// \brief An ObjCObjectPointerType record.
551 TYPE_OBJC_OBJECT_POINTER = 22,
552 /// \brief a DecltypeType record.
554 /// \brief An ElaboratedType record.
555 TYPE_ELABORATED = 24,
556 /// \brief A SubstTemplateTypeParmType record.
557 TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
558 /// \brief An UnresolvedUsingType record.
559 TYPE_UNRESOLVED_USING = 26,
560 /// \brief An InjectedClassNameType record.
561 TYPE_INJECTED_CLASS_NAME = 27,
562 /// \brief An ObjCObjectType record.
563 TYPE_OBJC_OBJECT = 28,
564 /// \brief An TemplateTypeParmType record.
565 TYPE_TEMPLATE_TYPE_PARM = 29,
566 /// \brief An TemplateSpecializationType record.
567 TYPE_TEMPLATE_SPECIALIZATION = 30,
568 /// \brief A DependentNameType record.
569 TYPE_DEPENDENT_NAME = 31,
570 /// \brief A DependentTemplateSpecializationType record.
571 TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
572 /// \brief A DependentSizedArrayType record.
573 TYPE_DEPENDENT_SIZED_ARRAY = 33,
574 /// \brief A ParenType record.
576 /// \brief A PackExpansionType record.
577 TYPE_PACK_EXPANSION = 35,
578 /// \brief An AttributedType record.
579 TYPE_ATTRIBUTED = 36,
580 /// \brief A SubstTemplateTypeParmPackType record.
581 TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37,
582 /// \brief A AutoType record.
586 /// \brief The type IDs for special types constructed by semantic
589 /// The constants in this enumeration are indices into the
590 /// SPECIAL_TYPES record.
591 enum SpecialTypeIDs {
592 /// \brief __builtin_va_list
593 SPECIAL_TYPE_BUILTIN_VA_LIST = 0,
594 /// \brief Objective-C "id" type
595 SPECIAL_TYPE_OBJC_ID = 1,
596 /// \brief Objective-C selector type
597 SPECIAL_TYPE_OBJC_SELECTOR = 2,
598 /// \brief Objective-C Protocol type
599 SPECIAL_TYPE_OBJC_PROTOCOL = 3,
600 /// \brief Objective-C Class type
601 SPECIAL_TYPE_OBJC_CLASS = 4,
602 /// \brief CFConstantString type
603 SPECIAL_TYPE_CF_CONSTANT_STRING = 5,
604 /// \brief Objective-C fast enumeration state type
605 SPECIAL_TYPE_OBJC_FAST_ENUMERATION_STATE = 6,
606 /// \brief C FILE typedef type
607 SPECIAL_TYPE_FILE = 7,
608 /// \brief C jmp_buf typedef type
609 SPECIAL_TYPE_jmp_buf = 8,
610 /// \brief C sigjmp_buf typedef type
611 SPECIAL_TYPE_sigjmp_buf = 9,
612 /// \brief Objective-C "id" redefinition type
613 SPECIAL_TYPE_OBJC_ID_REDEFINITION = 10,
614 /// \brief Objective-C "Class" redefinition type
615 SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 11,
616 /// \brief Block descriptor type for Blocks CodeGen
617 SPECIAL_TYPE_BLOCK_DESCRIPTOR = 12,
618 /// \brief Block extedned descriptor type for Blocks CodeGen
619 SPECIAL_TYPE_BLOCK_EXTENDED_DESCRIPTOR = 13,
620 /// \brief Objective-C "SEL" redefinition type
621 SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 14,
622 /// \brief NSConstantString type
623 SPECIAL_TYPE_NS_CONSTANT_STRING = 15,
624 /// \brief Whether __[u]int128_t identifier is installed.
625 SPECIAL_TYPE_INT128_INSTALLED = 16
628 /// \brief Record codes for each kind of declaration.
630 /// These constants describe the declaration records that can occur within
631 /// a declarations block (identified by DECLS_BLOCK_ID). Each
632 /// constant describes a record for a specific declaration class
635 /// \brief A TranslationUnitDecl record.
636 DECL_TRANSLATION_UNIT = 50,
637 /// \brief A TypedefDecl record.
639 /// \brief An EnumDecl record.
641 /// \brief A RecordDecl record.
643 /// \brief An EnumConstantDecl record.
645 /// \brief A FunctionDecl record.
647 /// \brief A ObjCMethodDecl record.
649 /// \brief A ObjCInterfaceDecl record.
651 /// \brief A ObjCProtocolDecl record.
653 /// \brief A ObjCIvarDecl record.
655 /// \brief A ObjCAtDefsFieldDecl record.
656 DECL_OBJC_AT_DEFS_FIELD,
657 /// \brief A ObjCClassDecl record.
659 /// \brief A ObjCForwardProtocolDecl record.
660 DECL_OBJC_FORWARD_PROTOCOL,
661 /// \brief A ObjCCategoryDecl record.
663 /// \brief A ObjCCategoryImplDecl record.
664 DECL_OBJC_CATEGORY_IMPL,
665 /// \brief A ObjCImplementationDecl record.
666 DECL_OBJC_IMPLEMENTATION,
667 /// \brief A ObjCCompatibleAliasDecl record.
668 DECL_OBJC_COMPATIBLE_ALIAS,
669 /// \brief A ObjCPropertyDecl record.
671 /// \brief A ObjCPropertyImplDecl record.
672 DECL_OBJC_PROPERTY_IMPL,
673 /// \brief A FieldDecl record.
675 /// \brief A VarDecl record.
677 /// \brief An ImplicitParamDecl record.
679 /// \brief A ParmVarDecl record.
681 /// \brief A FileScopeAsmDecl record.
683 /// \brief A BlockDecl record.
685 /// \brief A record that stores the set of declarations that are
686 /// lexically stored within a given DeclContext.
688 /// The record itself is a blob that is an array of declaration IDs,
689 /// in the order in which those declarations were added to the
690 /// declaration context. This data is used when iterating over
691 /// the contents of a DeclContext, e.g., via
692 /// DeclContext::decls_begin()/DeclContext::decls_end().
693 DECL_CONTEXT_LEXICAL,
694 /// \brief A record that stores the set of declarations that are
695 /// visible from a given DeclContext.
697 /// The record itself stores a set of mappings, each of which
698 /// associates a declaration name with one or more declaration
699 /// IDs. This data is used when performing qualified name lookup
700 /// into a DeclContext via DeclContext::lookup.
701 DECL_CONTEXT_VISIBLE,
702 /// \brief A LabelDecl record.
704 /// \brief A NamespaceDecl record.
706 /// \brief A NamespaceAliasDecl record.
707 DECL_NAMESPACE_ALIAS,
708 /// \brief A UsingDecl record.
710 /// \brief A UsingShadowDecl record.
712 /// \brief A UsingDirecitveDecl record.
713 DECL_USING_DIRECTIVE,
714 /// \brief An UnresolvedUsingValueDecl record.
715 DECL_UNRESOLVED_USING_VALUE,
716 /// \brief An UnresolvedUsingTypenameDecl record.
717 DECL_UNRESOLVED_USING_TYPENAME,
718 /// \brief A LinkageSpecDecl record.
720 /// \brief A CXXRecordDecl record.
722 /// \brief A CXXMethodDecl record.
724 /// \brief A CXXConstructorDecl record.
725 DECL_CXX_CONSTRUCTOR,
726 /// \brief A CXXDestructorDecl record.
728 /// \brief A CXXConversionDecl record.
730 /// \brief An AccessSpecDecl record.
733 /// \brief A FriendDecl record.
735 /// \brief A FriendTemplateDecl record.
736 DECL_FRIEND_TEMPLATE,
737 /// \brief A ClassTemplateDecl record.
739 /// \brief A ClassTemplateSpecializationDecl record.
740 DECL_CLASS_TEMPLATE_SPECIALIZATION,
741 /// \brief A ClassTemplatePartialSpecializationDecl record.
742 DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
743 /// \brief A FunctionTemplateDecl record.
744 DECL_FUNCTION_TEMPLATE,
745 /// \brief A TemplateTypeParmDecl record.
746 DECL_TEMPLATE_TYPE_PARM,
747 /// \brief A NonTypeTemplateParmDecl record.
748 DECL_NON_TYPE_TEMPLATE_PARM,
749 /// \brief A TemplateTemplateParmDecl record.
750 DECL_TEMPLATE_TEMPLATE_PARM,
751 /// \brief A StaticAssertDecl record.
753 /// \brief A record containing CXXBaseSpecifiers.
754 DECL_CXX_BASE_SPECIFIERS,
755 /// \brief A IndirectFieldDecl record.
757 /// \brief A NonTypeTemplateParmDecl record that stores an expanded
758 /// non-type template parameter pack.
759 DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK
762 /// \brief Record codes for each kind of statement or expression.
764 /// These constants describe the records that describe statements
765 /// or expressions. These records occur within type and declarations
766 /// block, so they begin with record values of 100. Each constant
767 /// describes a record for a specific statement or expression class in the
770 /// \brief A marker record that indicates that we are at the end
771 /// of an expression.
773 /// \brief A NULL expression.
775 /// \brief A NullStmt record.
777 /// \brief A CompoundStmt record.
779 /// \brief A CaseStmt record.
781 /// \brief A DefaultStmt record.
783 /// \brief A LabelStmt record.
785 /// \brief An IfStmt record.
787 /// \brief A SwitchStmt record.
789 /// \brief A WhileStmt record.
791 /// \brief A DoStmt record.
793 /// \brief A ForStmt record.
795 /// \brief A GotoStmt record.
797 /// \brief An IndirectGotoStmt record.
799 /// \brief A ContinueStmt record.
801 /// \brief A BreakStmt record.
803 /// \brief A ReturnStmt record.
805 /// \brief A DeclStmt record.
807 /// \brief An AsmStmt record.
809 /// \brief A PredefinedExpr record.
811 /// \brief A DeclRefExpr record.
813 /// \brief An IntegerLiteral record.
814 EXPR_INTEGER_LITERAL,
815 /// \brief A FloatingLiteral record.
816 EXPR_FLOATING_LITERAL,
817 /// \brief An ImaginaryLiteral record.
818 EXPR_IMAGINARY_LITERAL,
819 /// \brief A StringLiteral record.
821 /// \brief A CharacterLiteral record.
822 EXPR_CHARACTER_LITERAL,
823 /// \brief A ParenExpr record.
825 /// \brief A ParenListExpr record.
827 /// \brief A UnaryOperator record.
829 /// \brief An OffsetOfExpr record.
831 /// \brief A SizefAlignOfExpr record.
832 EXPR_SIZEOF_ALIGN_OF,
833 /// \brief An ArraySubscriptExpr record.
834 EXPR_ARRAY_SUBSCRIPT,
835 /// \brief A CallExpr record.
837 /// \brief A MemberExpr record.
839 /// \brief A BinaryOperator record.
840 EXPR_BINARY_OPERATOR,
841 /// \brief A CompoundAssignOperator record.
842 EXPR_COMPOUND_ASSIGN_OPERATOR,
843 /// \brief A ConditionOperator record.
844 EXPR_CONDITIONAL_OPERATOR,
845 /// \brief An ImplicitCastExpr record.
847 /// \brief A CStyleCastExpr record.
849 /// \brief A CompoundLiteralExpr record.
850 EXPR_COMPOUND_LITERAL,
851 /// \brief An ExtVectorElementExpr record.
852 EXPR_EXT_VECTOR_ELEMENT,
853 /// \brief An InitListExpr record.
855 /// \brief A DesignatedInitExpr record.
856 EXPR_DESIGNATED_INIT,
857 /// \brief An ImplicitValueInitExpr record.
858 EXPR_IMPLICIT_VALUE_INIT,
859 /// \brief A VAArgExpr record.
861 /// \brief An AddrLabelExpr record.
863 /// \brief A StmtExpr record.
865 /// \brief A ChooseExpr record.
867 /// \brief A GNUNullExpr record.
869 /// \brief A ShuffleVectorExpr record.
873 /// \brief A BlockDeclRef record.
878 /// \brief An ObjCStringLiteral record.
879 EXPR_OBJC_STRING_LITERAL,
880 /// \brief An ObjCEncodeExpr record.
882 /// \brief An ObjCSelectorExpr record.
883 EXPR_OBJC_SELECTOR_EXPR,
884 /// \brief An ObjCProtocolExpr record.
885 EXPR_OBJC_PROTOCOL_EXPR,
886 /// \brief An ObjCIvarRefExpr record.
887 EXPR_OBJC_IVAR_REF_EXPR,
888 /// \brief An ObjCPropertyRefExpr record.
889 EXPR_OBJC_PROPERTY_REF_EXPR,
891 EXPR_OBJC_KVC_REF_EXPR,
892 /// \brief An ObjCMessageExpr record.
893 EXPR_OBJC_MESSAGE_EXPR,
894 /// \brief An ObjCIsa Expr record.
897 /// \brief An ObjCForCollectionStmt record.
898 STMT_OBJC_FOR_COLLECTION,
899 /// \brief An ObjCAtCatchStmt record.
901 /// \brief An ObjCAtFinallyStmt record.
903 /// \brief An ObjCAtTryStmt record.
905 /// \brief An ObjCAtSynchronizedStmt record.
906 STMT_OBJC_AT_SYNCHRONIZED,
907 /// \brief An ObjCAtThrowStmt record.
912 /// \brief A CXXCatchStmt record.
914 /// \brief A CXXTryStmt record.
917 /// \brief A CXXOperatorCallExpr record.
918 EXPR_CXX_OPERATOR_CALL,
919 /// \brief A CXXMemberCallExpr record.
920 EXPR_CXX_MEMBER_CALL,
921 /// \brief A CXXConstructExpr record.
923 /// \brief A CXXTemporaryObjectExpr record.
924 EXPR_CXX_TEMPORARY_OBJECT,
925 /// \brief A CXXStaticCastExpr record.
926 EXPR_CXX_STATIC_CAST,
927 /// \brief A CXXDynamicCastExpr record.
928 EXPR_CXX_DYNAMIC_CAST,
929 /// \brief A CXXReinterpretCastExpr record.
930 EXPR_CXX_REINTERPRET_CAST,
931 /// \brief A CXXConstCastExpr record.
933 /// \brief A CXXFunctionalCastExpr record.
934 EXPR_CXX_FUNCTIONAL_CAST,
935 /// \brief A CXXBoolLiteralExpr record.
936 EXPR_CXX_BOOL_LITERAL,
937 EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr
938 EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr).
939 EXPR_CXX_TYPEID_TYPE, // CXXTypeidExpr (of type).
940 EXPR_CXX_UUIDOF_EXPR, // CXXUuidofExpr (of expr).
941 EXPR_CXX_UUIDOF_TYPE, // CXXUuidofExpr (of type).
942 EXPR_CXX_THIS, // CXXThisExpr
943 EXPR_CXX_THROW, // CXXThrowExpr
944 EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr
945 EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr
947 EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
948 EXPR_CXX_NEW, // CXXNewExpr
949 EXPR_CXX_DELETE, // CXXDeleteExpr
950 EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
952 EXPR_EXPR_WITH_CLEANUPS, // ExprWithCleanups
954 EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr
955 EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
956 EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr
957 EXPR_CXX_UNRESOLVED_MEMBER, // UnresolvedMemberExpr
958 EXPR_CXX_UNRESOLVED_LOOKUP, // UnresolvedLookupExpr
960 EXPR_CXX_UNARY_TYPE_TRAIT, // UnaryTypeTraitExpr
961 EXPR_CXX_NOEXCEPT, // CXXNoexceptExpr
963 EXPR_OPAQUE_VALUE, // OpaqueValueExpr
964 EXPR_BINARY_CONDITIONAL_OPERATOR, // BinaryConditionalOperator
965 EXPR_BINARY_TYPE_TRAIT, // BinaryTypeTraitExpr
967 EXPR_PACK_EXPANSION, // PackExpansionExpr
968 EXPR_SIZEOF_PACK, // SizeOfPackExpr
969 EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr
973 EXPR_CUDA_KERNEL_CALL // CUDAKernelCallExpr
976 /// \brief The kinds of designators that can occur in a
977 /// DesignatedInitExpr.
978 enum DesignatorTypes {
979 /// \brief Field designator where only the field name is known.
980 DESIG_FIELD_NAME = 0,
981 /// \brief Field designator where the field has been resolved to
983 DESIG_FIELD_DECL = 1,
984 /// \brief Array designator.
986 /// \brief GNU array range designator.
987 DESIG_ARRAY_RANGE = 3
992 } // end namespace clang