17 #ifndef LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
18 #define LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
21 #include "llvm/ADT/DenseMap.h"
22 #include "llvm/Bitcode/BitCodes.h"
23 #include "llvm/Support/DataTypes.h"
26 namespace serialization {
89 explicit TypeIdx(uint32_t index) : Idx(index) { }
93 if (Idx == uint32_t(-1))
118 "hash invalid for types with fast quals");
120 return (
unsigned(v) >> 4) ^ (
unsigned(v) >> 9);
177 :
Begin(R.getBegin().getRawEncoding()),
178 End(R.getEnd().getRawEncoding()),
179 BitOffset(BitOffset) { }
191 : Loc(Loc.getRawEncoding()),
192 BitOffset(BitOffset) { }
A CXXConstCastExpr record.
A FriendTemplateDecl record.
A CompoundLiteralExpr record.
A NonTypeTemplateParmDecl record.
DesignatorTypes
The kinds of designators that can occur in a DesignatedInitExpr.
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 the signature that identifiers this AST file.
Record code for potentially unused local typedef names.
Record code for map of Objective-C class definition IDs to the ObjC categories in a module that are a...
An IndirectGotoStmt record.
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.
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.
A ObjCBoolLiteralExpr record.
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.
uint32_t IdentID
An ID number that refers to an identifier in an AST file.
The 'unknown any' placeholder type.
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...
An IncompleteArrayType record.
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
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)
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. [PP_COUNTER_VALUE, Val].
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.
A TemplateTemplateParmDecl record.
Record code for the array of eagerly deserialized decls.
A ObjCInterfaceDecl record.
Record code for the array of redeclaration chains.
A ShuffleVectorExpr record.
C ucontext_t typedef type.
const unsigned VERSION_MAJOR
AST file major version number supported by this version of Clang.
A macro directive exported by a module. [PP_MODULE_MACRO, SubmoduleID, MacroID, (Overridden Submodule...
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.
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.
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.
OpenCL 1d image buffer type.
An AttributedType record.
An object-like macro definition. [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed].
Describes one token. [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags].
Record code for the diagnostic options table.
A IndirectFieldDecl record.
Record code for the set of ext_vector type names.
Record code for the headers search options table.
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. This kind of record always directly follo...
Specifies a conflict with another module.
The signed 128-bit integer type.
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.
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 '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.
std::pair< uint32_t, DeclID > KindDeclIDPair
a Decl::Kind/DeclID pair.
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.
Record code for the array describing the locations (in the LOCAL_REDECLARATIONS record) of the redecl...
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)
Record code for the preprocessor options table.
A StaticAssertDecl record.
ID
Defines the set of possible language-specific address spaces.
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.
A ObjCCategoryImplDecl record.
Record code for the array of VTable uses.
The 'char' type, when it is unsigned.
Record code for the target options table.
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.
static bool isEqual(QualType A, QualType B)
A NamespaceAliasDecl record.
Record code for an update to a decl context's lookup table.
const unsigned VERSION_MINOR
AST file minor version number supported by this version of Clang.
The width of the "fast" qualifier mask.
friend bool operator>=(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
A DesignatedInitUpdateExpr record.
Record code for the filesystem options table.
friend bool operator<(const LocalRedeclarationsInfo &X, const LocalRedeclarationsInfo &Y)
An ImplicitParamDecl 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.
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. The SourceManager can decode this to get at the full include stack...
Record code for the language options table.
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 the table of offsets to CXXBaseSpecifier sets.
Record code for special CUDA declarations.
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. DON"T CHANGE THIS NUMBER.
The 'unsigned char' type.
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.
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.
Record code for the list of other AST files made available by this AST file but not actually used by ...
The __va_list_tag placeholder type.
SubmoduleRecordTypes
Record types used within a submodule description block.
Objective-C "SEL" redefinition type.
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 a decl replacement block.
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)
Record code for the module name.
An IntegerLiteral record.
Describes an inclusion directive within the preprocessing record.
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.
An ExtVectorElementExpr record.
Record code for the array of unused file scoped decls.
A FunctionNoProtoType record.
A ClassTemplatePartialSpecializationDecl record.
An ObjCIvarRefExpr record.
DeclCode
Record codes for each kind of declaration.
An ObjCAutoreleasePoolStmt record.
A ClassScopeFunctionSpecializationDecl record a class scope function specialization. (Microsoft extension).
Record code for the Objective-C method pool,.
Record of updates for a declaration that was modified after being deserialized.
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.
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
OpenCL 2d image array type.
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.
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.
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.
An ObjCAtCatchStmt record.
A ObjCImplementationDecl record.
Field designator where the field has been resolved to a declaration.
A ObjCAtDefsFieldDecl record.
Record code for the offsets of each type.
The block containing the definitions of all of the types and decls used within the AST file...
Record code for the table of offsets to CXXCtorInitializers lists.
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.
A FunctionTemplateDecl record.
A TypeAliasTemplateDecl record.
Record code for weak undeclared identifiers.
The block containing information about the preprocessor.
OpenCL 1d image array type.
uint32_t TypeID
An ID number that refers to a type in an AST file.
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.
static TypeIdx fromTypeID(TypeID ID)
InputFileRecordTypes
Record types that occur within the input-files block inside the control block.
A function-like macro definition. [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars, NumArgs, ArgIdentInfoID* ].
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.
A DependentTemplateSpecializationType record.
Record code for the array of tentative definitions.