17 #ifndef LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
18 #define LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
22 #include "llvm/ADT/DenseMap.h"
23 #include "llvm/Bitcode/BitCodes.h"
24 #include "llvm/Support/DataTypes.h"
27 namespace serialization {
87 explicit TypeIdx(uint32_t index) : Idx(index) { }
91 if (Idx == uint32_t(-1))
116 "hash invalid for types with fast quals");
118 return (
unsigned(v) >> 4) ^ (
unsigned(v) >> 9);
177 BitOffset(BitOffset) { }
195 : Loc(Loc.getRawEncoding()),
196 BitOffset(BitOffset) { }
800 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
801 PREDEF_TYPE_##Id##_ID,
802 #include "clang/Basic/OpenCLImageTypes.def"
1584 : Kind(Kind), Data(Data) {}
1609 return A.Kind == B.Kind && A.Data == B.Data;
1618 template <>
struct DenseMapInfo<clang::serialization::DeclarationNameKey> {
A CXXConstCastExpr record.
A FriendTemplateDecl record.
A CompoundLiteralExpr record.
A NonTypeTemplateParmDecl record.
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.
IdentifierInfo * getIdentifier() const
A UserDefinedLiteral record.
Source range/offset of a preprocessed entity.
Record code for the signature that identifiers this AST file.
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.
A (possibly-)qualified type.
CtorInitializerType
The different kinds of data that can occur in a CtorInitializer.
The macro directives history for a particular identifier.
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.
An ObjCBoolLiteralExpr record.
unsigned getHash() const
Compute a fingerprint of this key for use in on-disk hash table.
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()
ControlRecordTypes
Record types that occur within the control block.
C Language Family Type Representation.
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
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.
uint32_t DeclID
An ID number that refers to a declaration in an AST file.
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.
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
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.
A ClassTemplateDecl record.
void * getAsOpaquePtr() const
A PragmaDetectMismatchDecl record.
An UnresolvedUsingTypenameDecl record.
uint32_t IdentifierID
An ID number that refers to an identifier in an AST file.
The internal '__builtin_va_list' typedef.
friend bool operator<(const ObjCCategoriesInfo &X, const ObjCCategoriesInfo &Y)
An OMPCapturedExprDecl record.
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.
Record code for the diagnostic options table.
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.
SourceLocation getBegin() const
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.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
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.
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.
An object-like macro definition.
SourceLocation getEnd() const
A IndirectFieldDecl record.
Record code for the set of ext_vector type names.
Specifies the submodules that are re-exported from this submodule.
uint32_t SubmoduleID
An ID number that refers to a submodule in a module file.
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.
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.
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.
uint32_t GlobalMacroID
A global ID number that refers to a macro in an AST file.
Record code for #pragma diagnostic mappings.
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.
A MemberPointerType record.
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.
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 "auto &&" deduction type.
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.
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.
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.
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.
uint32_t LocalMacroID
A local to a module ID number that refers to a macro in an AST file.
An ObjCSubscriptRefExpr record.
A CXXConstructorDecl record.
The OpenCL 'half' / ARM NEON __fp16 type.
The block containing the detailed preprocessing record.
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.
A PseudoObjectExpr record.
A CXXDestructorDecl record.
A FunctionProtoType record.
A NonTypeTemplateParmDecl record that stores an expanded non-type template parameter pack...
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.
unsigned getLocalFastQualifiers() const
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.
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.
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.
The (signed) 'long' type.
A CXXFunctionalCastExpr record.
A FloatingLiteral record.
Record code for the offsets of each decl.
Metadata for submodules as a whole.
The width of the "fast" qualifier mask.
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.
Describes the categories of an Objective-C class.
uint32_t MacroID
An ID number that refers to a macro in an AST file.
The AST block, which acts as a container around the full AST block.
SubmoduleRecordTypes
Record types used within a submodule description block.
Objective-C "SEL" redefinition type.
const unsigned int DECL_UPDATES
Record of updates for a declaration that was modified after being deserialized.
An InjectedClassNameType record.
Record code for the extra statistics we gather while generating an AST file.
uint32_t BitOffset
Offset in the AST file.
static QualType getFromOpaquePtr(const void *Ptr)
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)
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.
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.
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)
An ObjCAtFinallyStmt record.
uint32_t CXXCtorInitializersID
An ID number that refers to a list of CXXCtorInitializers in an AST file.
The placeholder type for dependent types.
TypeID asTypeID(unsigned FastQuals) const
A PragmaCommentDecl record.
C sigjmp_buf typedef type.
Record code for the table of offsets into the Objective-C method pool.
Selector getSelector() const
A DependentSizedArrayType record.
Record code for the remapping information used to relate loaded modules to the various offsets and ID...
An ObjCAtSynchronizedStmt record.
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)
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)
uint32_t PreprocessedEntityID
An ID number that refers to an entity in the detailed preprocessing record.
GNU array range designator.
A GCC-style AsmStmt record.
uint32_t SelectorID
An ID number that refers to an ObjC selector in an AST file.
An TemplateTypeParmType record.
Record code for the filesystem options table.
An ObjCAtCatchStmt record.
A ObjCImplementationDecl record.
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 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.
Describes the redeclarations of a declaration.
Specifies a required feature.
uint32_t getIndex() const
An ObjCMessageExpr record.
Record for offsets of DECL_UPDATES records for declarations that were modified after being deserializ...
A CompoundAssignOperator record.
SourceLocation getLocation() const
A FunctionTemplateDecl record.
A TypeAliasTemplateDecl record.
OverloadedOperatorKind getOperatorKind() const
Record code for weak undeclared identifiers.
The block containing information about the preprocessor.
uint32_t TypeID
An ID number that refers to a type in an AST file.
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...
uint32_t CXXBaseSpecifiersID
An ID number that refers to a set of CXXBaseSpecifiers in an AST file.
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.
unsigned Loc
Raw source location.
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.