18 #ifndef LLVM_CLANG_SERIALIZATION_ASTBITCODES_H 19 #define LLVM_CLANG_SERIALIZATION_ASTBITCODES_H 26 #include "llvm/ADT/DenseMapInfo.h" 27 #include "llvm/Bitcode/BitCodes.h" 32 namespace serialization {
94 explicit TypeIdx(uint32_t index) : Idx(index) {}
99 if (Idx == uint32_t(-1))
128 "hash invalid for types with fast quals");
130 return (
unsigned(v) >> 4) ^ (
unsigned(v) >> 9);
189 : Begin(R.getBegin().getRawEncoding()),
190 End(R.getEnd().getRawEncoding()), BitOffset(BitOffset) {}
207 uint32_t BitOffset = 0;
211 : Loc(Loc.getRawEncoding()), BitOffset(BitOffset) {}
918 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 919 PREDEF_TYPE_##Id##_ID, 920 #include "clang/Basic/OpenCLImageTypes.def" 1958 using NameKind = unsigned;
1967 : Kind(Kind), Data(Data) {}
1991 unsigned getHash()
const;
1995 return A.Kind == B.Kind && A.Data == B.Data;
2028 #endif // LLVM_CLANG_SERIALIZATION_ASTBITCODES_H A CXXConstCastExpr record.
A FriendTemplateDecl record.
A CompoundLiteralExpr record.
A NonTypeTemplateParmDecl record.
The ObjC 'SEL' type.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
Record code for the preprocessor options table.
BlockIDs
Describes the various kinds of blocks that occur within an AST file.
A UserDefinedLiteral record.
Source range/offset of a preprocessed entity.
Record code for potentially unused local typedef names.
Smart pointer class that efficiently represents Objective-C method names.
Record code for map of Objective-C class definition IDs to the ObjC categories in a module that are a...
An IndirectGotoStmt record.
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
A (possibly-)qualified type.
CtorInitializerType
The different kinds of data that can occur in a CtorInitializer.
The '_Float16' type.
The macro directives history for a particular identifier.
The 'unsigned int' type.
The (signed) 'long long' type.
A CXXStaticCastExpr record.
ExtensionBlockRecordTypes
Record code for extension blocks.
Record code for the source manager line table information, which stores information about #line direc...
An AttributedStmt record.
A CXXReinterpretCastExpr record.
The 'bool' or '_Bool' type.
An OMPThreadPrivateDecl record.
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
An ObjCBoolLiteralExpr record.
A structure for putting "fast"-unqualified QualTypes into a DenseMap.
const unsigned NUM_PREDEF_TYPE_IDS
The number of predefined type IDs that are reserved for the PREDEF_TYPE_* constants.
friend bool operator>(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
static QualType getTombstoneKey()
uint32_t GlobalMacroID
A global ID number that refers to a macro in an AST file.
ControlRecordTypes
Record types that occur within the control block.
C Language Family Type Representation.
The 'unknown any' placeholder type.
An OMPDeclareReductionDecl record.
An ImplicitValueInitExpr record.
SourceManagerRecordTypes
Record types used within a source manager block.
const unsigned int NUM_PREDEF_SELECTOR_IDS
The number of predefined selector IDs.
An ImplicitCastExpr record.
A VarTemplatePartialSpecializationDecl record.
unsigned Begin
Raw source location of beginning of range.
Describes a source location entry (SLocEntry) for a macro expansion.
An LValueReferenceType record.
The placeholder type for builtin functions.
A CXXOperatorCallExpr record.
Specifies the submodules that are imported by this submodule.
A record that stores the set of declarations that are lexically stored within a given DeclContext...
Specifies an umbrella directory.
A CXXTemporaryObjectExpr record.
A SubstTemplateTypeParmType record.
A ObjCPropertyDecl record.
Record code for enabled OpenCL extensions.
Record code for the module build directory.
An ElaboratedType record.
An UnresolvedUsingType record.
The 'float' type.
static clang::serialization::DeclarationNameKey getTombstoneKey()
An IncompleteArrayType record.
The internal '__type_pack_element' template.
Specifies a header that is part of the module but must be textually included.
ARC's unbridged-cast placeholder type.
The '__int128_t' type.
A ClassTemplateDecl record.
A PragmaDetectMismatchDecl record.
The C++ 'char32_t' type.
An UnresolvedUsingTypenameDecl record.
The internal '__builtin_va_list' typedef.
The stack of open #ifs/#ifdefs recorded in a preamble.
Record code for #pragma pack options.
A block with unhashed content.
friend bool operator<(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
An OMPCapturedExprDecl record.
Record code for declarations associated with OpenCL extensions.
A UsingShadowDecl record.
const unsigned int NUM_PREDEF_DECL_IDS
The number of declaration IDs that are predefined.
The value of the next COUNTER to dispense.
A ConditionOperator record.
A TemplateTemplateParmDecl record that stores an expanded template template parameter pack...
Specifies the umbrella header used to create this module, if any.
Record code for header search information.
Describes a source location entry (SLocEntry) for a buffer.
A CXXConstructExpr record.
Record code for the target options table.
A TemplateTemplateParmDecl record.
Record code for the array of eagerly deserialized decls.
A ObjCInterfaceDecl record.
A ShuffleVectorExpr record.
The width of the "fast" qualifier mask.
A CXXConstructorDecl record for an inherited constructor.
C ucontext_t typedef type.
const unsigned VERSION_MAJOR
AST file major version number supported by this version of Clang.
One of these records is kept for each identifier that is lexed.
A macro directive exported by a module.
An ObjCAtThrowStmt record.
Specifies a top-level header that falls into this (sub)module.
The block containing comments.
A DesignatedInitExpr record.
The Objective-C 'SEL' type.
static bool isEqual(const clang::serialization::DeclarationNameKey &L, const clang::serialization::DeclarationNameKey &R)
The 'char' type, when it is signed.
An ObjCProtocolExpr record.
An ObjCSelectorExpr record.
The 'unsigned long' type.
Specifies a header that has been explicitly excluded from this submodule.
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
SourceLocation getBegin() const
SpecialTypeIDs
The type IDs for special types constructed by semantic analysis.
friend bool operator<=(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
The unsigned 128-bit integer type.
Record code for the module map file that was used to build this AST file.
Delete expressions that will be analyzed later.
friend bool operator==(const DeclarationNameKey &A, const DeclarationNameKey &B)
An AttributedType record.
uint32_t MacroID
An ID number that refers to a macro in an AST file.
An object-like macro definition.
A IndirectFieldDecl record.
Record code for the set of ext_vector type names.
uint32_t LocalMacroID
A local to a module ID number that refers to a macro in an AST file.
Specifies the submodules that are re-exported from this submodule.
The Objective-C 'id' type.
An AccessSpecDecl record.
const unsigned NumSpecialTypeIDs
The number of special type IDs.
Describes a blob that contains the data for a buffer entry.
Record code for the language options table.
Specifies a conflict with another module.
unsigned getHash() const
Compute a fingerprint of this key for use in on-disk hash table.
The signed 128-bit integer type.
A ConstructorUsingShadowDecl record.
A UnaryTransformType record.
A reference to a previously [de]serialized Stmt record.
A UsingDirecitveDecl record.
An ObjCObjectType record.
A ConstantArrayType record.
Record code for #pragma optimize options.
uint32_t BitOffset
Offset in the AST file.
A DecompositionDecl record.
Specifies a header that is private to this submodule but must be textually included.
Record code for pending implicit instantiations.
The internal '__make_integer_seq' template.
Record code for floating point #pragma options.
CommentRecordTypes
Record types used within a comments block.
Record code for the set of known namespaces, which are used for typo correction.
Record code for an array of all of the (sub)modules that were imported by the AST file...
The first record ID allocated to the extensions themselves.
The 'unsigned short' type.
A marker record that indicates that we are at the end of an expression.
A ClassTemplateSpecializationDecl record.
A BlockPointerType record.
uint32_t getIndex() const
A MemberPointerType record.
void * getAsOpaquePtr() const
A DependentSizedExtVectorType record.
The type of 'nullptr'.
Record code for the table of offsets into the block of source-location information.
A SubstTemplateTypeParmPackType record.
Objective-C "id" redefinition type.
TypeCode
Record codes for each kind of type.
PPEntityOffset(SourceRange R, uint32_t BitOffset)
The block containing information about the source manager.
The placeholder type for OpenMP array section.
A VariableArrayType record.
unsigned getLocalFastQualifiers() const
const unsigned int NUM_PREDEF_PP_ENTITY_IDS
The number of predefined preprocessed entity IDs.
ASTRecordTypes
Record types that occur within the AST block itself.
Defines the major attributes of a submodule, including its name and parent.
The '__uint128_t' type.
The "auto &&" deduction type.
OverloadedOperatorKind getOperatorKind() const
A CXXDeductionGuideDecl record.
friend bool operator>(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
A StaticAssertDecl record.
A VarTemplateSpecializationDecl record.
Record code for the table of offsets of each macro ID.
An ObjCTypeParamDecl record.
A record containing CXXBaseSpecifiers.
Specifies some declarations with initializers that must be emitted to initialize the module...
An TemplateSpecializationType record.
An ObjCObjectPointerType record.
An ObjCInterfaceType record.
Describes a zlib-compressed blob that contains the data for a buffer entry.
A ObjCCategoryImplDecl record.
SourceLocation getEnd() const
Record code for the array of VTable uses.
The 'char' type, when it is unsigned.
The directory that the PCH was originally created in.
A ObjCPropertyImplDecl record.
const FunctionProtoType * T
The placeholder type for overloaded function sets.
Record code for the table of offsets to entries in the preprocessing record.
Field designator where only the field name is known.
An ObjCSubscriptRefExpr record.
Selector getSelector() const
A CXXConstructorDecl record.
The OpenCL 'half' / ARM NEON __fp16 type.
Defines an enumeration for C++ overloaded operators.
The block containing the detailed preprocessing record.
Record code for #pragma diagnostic mappings.
A CXXStdInitializerListExpr record.
A record containing CXXCtorInitializers.
A VarTemplateDecl record.
Record code for the original file that was used to generate the AST file, including both its file ID ...
An ArraySubscriptExpr record.
The 'long double' type.
An ArrayInitLoopExpr record.
Record code for the diagnostic options table.
uint32_t IdentifierID
An ID number that refers to an identifier in an AST file.
A PseudoObjectExpr record.
A CXXDestructorDecl record.
A FunctionProtoType record.
A NonTypeTemplateParmDecl record that stores an expanded non-type template parameter pack...
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Describes a source location entry (SLocEntry) for a file.
An ObjCIndirectCopyRestoreExpr record.
A block containing a module file extension.
static bool isEqual(QualType A, QualType B)
A NamespaceAliasDecl record.
Record code for an update to a decl context's lookup table.
Record code for #pragma ms_struct options.
const unsigned VERSION_MINOR
AST file minor version number supported by this version of Clang.
friend bool operator>=(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
A DesignatedInitUpdateExpr record.
friend bool operator<(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
An ImplicitParamDecl record.
An ObjCAvailabilityCheckExpr record.
An EnumConstantDecl record.
Record code for the table of offsets of each identifier ID.
Record code for undefined but used functions and variables that need a definition in this TU...
A DependentNameType record.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
An ImportDecl recording a module import.
A ObjCCategoryDecl record.
An ObjCPropertyRefExpr record.
An ObjCForCollectionStmt record.
Record code for the identifier table.
A FileScopeAsmDecl record.
A ObjCCompatibleAliasDecl record.
The placeholder type for bound member functions.
The "auto" deduction type.
A MS-style AsmStmt record.
friend bool operator>=(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
const unsigned int NUM_PREDEF_IDENT_IDS
The number of predefined identifier IDs.
The Objective-C 'Class' type.
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
The 'unsigned long long' type.
Record code for the set of source location entries that need to be preloaded by the AST reader...
The list of delegating constructor declarations.
Record code for types associated with OpenCL extensions.
An UnresolvedUsingValueDecl record.
Encodes a location in the source.
A record that stores the set of declarations that are visible from a given DeclContext.
Specifies a library or framework to link against.
Record code for file ID of the file or buffer that was used to generate the AST file.
Specifies a header that falls into this (sub)module.
Record code for special CUDA declarations.
A list of "interesting" identifiers.
The block of configuration options, used to check that a module is being used in a configuration comp...
PredefinedTypeIDs
Predefined type IDs.
This is so that older clang versions, before the introduction of the control block, can read and reject the newer PCH format.
The 'unsigned char' type.
Metadata describing this particular extension.
An ObjCTypeParamType record.
The (signed) 'long' type.
A CXXFunctionalCastExpr record.
A FloatingLiteral record.
Record code for the offsets of each decl.
Metadata for submodules as a whole.
An ObjCEncodeExpr record.
Record code for late parsed template functions.
The (signed) 'short' type.
A TemplateTypeParmDecl record.
An ImaginaryLiteral record.
static QualType getEmptyKey()
The internal 'instancetype' typedef.
OptionsRecordTypes
Record types that occur within the options block inside the control block.
SourceLocation getLocation() const
IdentifierInfo * getIdentifier() const
Describes the categories of an Objective-C class.
The AST block, which acts as a container around the full AST block.
A DeducedTemplateSpecializationType record.
SubmoduleRecordTypes
Record types used within a submodule description block.
uint32_t TypeID
An ID number that refers to a type in an AST file.
Objective-C "SEL" redefinition type.
const unsigned int DECL_UPDATES
Record of updates for a declaration that was modified after being deserialized.
UnhashedControlBlockRecordTypes
Record codes for the unhashed control block.
An InjectedClassNameType record.
Record code for the extra statistics we gather while generating an AST file.
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
static QualType getFromOpaquePtr(const void *Ptr)
The 'signed char' type.
Record code for the signature that identifiers this AST file.
Record code for referenced selector pool.
Record code for the set of non-builtin, special types.
A ObjCProtocolDecl record.
friend bool operator<=(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
The ObjC 'id' type.
Record code for the list of other AST files imported by this AST file.
A CXXConversionDecl record.
Describes a macro definition within the preprocessing record.
static unsigned getHashValue(QualType T)
The internal '__NSConstantString' typedef.
Record code for the module name.
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
Dataflow Directional Tag Classes.
An IntegerLiteral record.
Describes an inclusion directive within the preprocessing record.
The internal '__builtin_ms_va_list' typedef.
Record code for a file sorted array of DeclIDs in a module.
A CXXBoolLiteralExpr record.
Record code for the array of Objective-C categories (including extensions).
Specifies a configuration macro for this module.
PreprocessorDetailRecordTypes
Record types used within a preprocessor detail block.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
TypeID asTypeID(unsigned FastQuals) const
An ExtVectorElementExpr record.
Record code for the array of unused file scoped decls.
A FunctionNoProtoType record.
A ClassTemplatePartialSpecializationDecl record.
An ObjCIvarRefExpr record.
static clang::serialization::DeclarationNameKey getEmptyKey()
DeclCode
Record codes for each kind of declaration.
An ObjCAutoreleasePoolStmt record.
DeclarationName - The name of a declaration.
A ClassScopeFunctionSpecializationDecl record a class scope function specialization.
Record code for the Objective-C method pool,.
A CharacterLiteral record.
Specifies a header that is private to this submodule.
A LinkageSpecDecl record.
Describes a macro expansion within the preprocessing record.
An ObjCStringLiteral record.
A CXXDynamicCastExpr record.
A CXXForRangeStmt record.
An RValueReferenceType record.
DeclarationNameKey(NameKind Kind, uint64_t Data)
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
An ObjCAtFinallyStmt record.
The placeholder type for dependent types.
Number of unmatched #pragma clang cuda_force_host_device begin directives we've seen.
A PragmaCommentDecl record.
C sigjmp_buf typedef type.
Record code for the table of offsets into the Objective-C method pool.
A DependentSizedArrayType record.
Record code for the remapping information used to relate loaded modules to the various offsets and ID...
An ObjCAtSynchronizedStmt record.
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
A key used when looking up entities by DeclarationName.
Record code for declarations that Sema keeps references of.
A SizefAlignOfExpr record.
const unsigned int NUM_PREDEF_MACRO_IDS
The number of predefined macro IDs.
Offsets into the input-files block where input files reside.
A CXXMemberCallExpr record.
PreprocessorRecordTypes
Record types used within a preprocessor block.
The block containing the submodule structure.
void setLocation(SourceLocation L)
uint32_t CXXBaseSpecifiersID
An ID number that refers to a set of CXXBaseSpecifiers in an AST file.
A ConvertVectorExpr record.
unsigned End
Raw source location of end of range.
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
DeclOffset(SourceLocation Loc, uint32_t BitOffset)
GNU array range designator.
The C++ 'char16_t' type.
Defines the clang::SourceLocation class and associated facilities.
An ArrayInitIndexExpr record.
A GCC-style AsmStmt record.
An TemplateTypeParmType record.
Record code for the filesystem options table.
An ObjCAtCatchStmt record.
A ObjCImplementationDecl record.
uint32_t CXXCtorInitializersID
An ID number that refers to a list of CXXCtorInitializers in an AST file.
Field designator where the field has been resolved to a declaration.
static unsigned getHashValue(const clang::serialization::DeclarationNameKey &Key)
A ObjCAtDefsFieldDecl record.
Record code for the offsets of each type.
A DependentAddressSpaceType record.
A CXXInheritedCtorInitExpr record.
The block containing the definitions of all of the types and decls used within the AST file...
The internal '__va_list_tag' struct, if any.
const unsigned int LOCAL_REDECLARATIONS
Record code for a list of local redeclarations of a declaration.
Specifies the name of the module that will eventually re-export the entities in this module...
The 'double' type.
Describes the redeclarations of a declaration.
The (signed) 'int' type.
Specifies a required feature.
An ObjCMessageExpr record.
Record for offsets of DECL_UPDATES records for declarations that were modified after being deserializ...
A CompoundAssignOperator record.
The C++ 'wchar_t' type.
The ObjC 'Class' type.
A FunctionTemplateDecl record.
A TypeAliasTemplateDecl record.
Record code for weak undeclared identifiers.
The block containing information about the preprocessor.
Record code for the headers search options table.
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...
The block of input files, which were used as inputs to create this AST file.
The internal '__NSConstantString' tag type.
static TypeIdx fromTypeID(TypeID ID)
InputFileRecordTypes
Record types that occur within the input-files block inside the control block.
A function-like macro definition.
The Objective-C 'Protocol' type.
The control block, which contains all of the information that needs to be validated prior to committi...
StmtCode
Record codes for each kind of statement or expression.
PredefinedDeclIDs
Predefined declaration IDs.
Record code for an update to the TU's lexically contained declarations.
Source range/offset of a preprocessed entity.
A GenericSelectionExpr record.
A type index; the type ID with the qualifier bits removed.
Objective-C "Class" redefinition type.
A PackExpansionType record.
The pseudo-object placeholder type.
const unsigned int NUM_PREDEF_SUBMODULE_IDS
The number of predefined submodule IDs.
Record code for #pragma ms_struct options.
A DependentTemplateSpecializationType record.
Record code for the array of tentative definitions.
The '__float128' type.