clang API Documentation

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
clang::serialization Namespace Reference

Namespaces

namespace  reader

Classes

class  TypeIdx
 A type index; the type ID with the qualifier bits removed. More...
struct  UnsafeQualTypeDenseMapInfo
struct  PPEntityOffset
 Source range/offset of a preprocessed entity. More...
struct  DeclOffset
 Source range/offset of a preprocessed entity. More...
struct  LocalRedeclarationsInfo
 Describes the redeclarations of a declaration. More...
struct  ObjCCategoriesInfo
 Describes the categories of an Objective-C class. More...
struct  DeclContextInfo
 Information about the contents of a DeclContext. More...
class  ModuleFile
 Information about a module that has been loaded by the ASTReader. More...
class  ModuleManager
 Manages the set of modules loaded by an AST reader. More...
class  ReadMethodPoolVisitor

Typedefs

typedef uint32_t IdentifierID
 An ID number that refers to an identifier in an AST file.
typedef uint32_t DeclID
 An ID number that refers to a declaration in an AST file.
typedef std::pair< uint32_t,
DeclID
KindDeclIDPair
 a Decl::Kind/DeclID pair.
typedef DeclID LocalDeclID
typedef DeclID GlobalDeclID
typedef uint32_t TypeID
 An ID number that refers to a type in an AST file.
typedef uint32_t IdentID
 An ID number that refers to an identifier in an AST file.
typedef uint32_t SelectorID
 An ID number that refers to an ObjC selector in an AST file.
typedef uint32_t CXXBaseSpecifiersID
 An ID number that refers to a set of CXXBaseSpecifiers in an AST file.
typedef uint32_t PreprocessedEntityID
 An ID number that refers to an entity in the detailed preprocessing record.
typedef uint32_t SubmoduleID
 An ID number that refers to a submodule in a module file.

Enumerations

enum  BlockIDs {
  AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID, SOURCE_MANAGER_BLOCK_ID, PREPROCESSOR_BLOCK_ID, DECLTYPES_BLOCK_ID,
  DECL_UPDATES_BLOCK_ID, PREPROCESSOR_DETAIL_BLOCK_ID, SUBMODULE_BLOCK_ID
}
 Describes the various kinds of blocks that occur within an AST file. More...
enum  ASTRecordTypes {
  TYPE_OFFSET = 1, DECL_OFFSET = 2, LANGUAGE_OPTIONS = 3, METADATA = 4,
  IDENTIFIER_OFFSET = 5, IDENTIFIER_TABLE = 6, EXTERNAL_DEFINITIONS = 7, SPECIAL_TYPES = 8,
  STATISTICS = 9, TENTATIVE_DEFINITIONS = 10, LOCALLY_SCOPED_EXTERNAL_DECLS = 11, SELECTOR_OFFSETS = 12,
  METHOD_POOL = 13, PP_COUNTER_VALUE = 14, SOURCE_LOCATION_OFFSETS = 15, SOURCE_LOCATION_PRELOADS = 16,
  STAT_CACHE = 17, EXT_VECTOR_DECLS = 18, ORIGINAL_FILE_NAME = 19, ORIGINAL_FILE_ID = 20,
  VERSION_CONTROL_BRANCH_REVISION = 21, UNUSED_FILESCOPED_DECLS = 22, PPD_ENTITIES_OFFSETS = 23, VTABLE_USES = 24,
  DYNAMIC_CLASSES = 25, IMPORTS = 26, REFERENCED_SELECTOR_POOL = 27, TU_UPDATE_LEXICAL = 28,
  LOCAL_REDECLARATIONS_MAP = 29, SEMA_DECL_REFS = 30, WEAK_UNDECLARED_IDENTIFIERS = 31, PENDING_IMPLICIT_INSTANTIATIONS = 32,
  DECL_REPLACEMENTS = 33, UPDATE_VISIBLE = 34, DECL_UPDATE_OFFSETS = 35, DECL_UPDATES = 36,
  CXX_BASE_SPECIFIER_OFFSETS = 37, DIAG_PRAGMA_MAPPINGS = 38, CUDA_SPECIAL_DECL_REFS = 39, HEADER_SEARCH_TABLE = 40,
  ORIGINAL_PCH_DIR = 41, FP_PRAGMA_OPTIONS = 42, OPENCL_EXTENSIONS = 43, DELEGATING_CTORS = 44,
  FILE_SOURCE_LOCATION_OFFSETS = 45, KNOWN_NAMESPACES = 46, MODULE_OFFSET_MAP = 47, SOURCE_MANAGER_LINE_TABLE = 48,
  OBJC_CATEGORIES_MAP = 49, FILE_SORTED_DECLS = 50, IMPORTED_MODULES = 51, MERGED_DECLARATIONS = 52,
  LOCAL_REDECLARATIONS = 53, OBJC_CATEGORIES
}
 Record types that occur within the AST block itself. More...
enum  SourceManagerRecordTypes { SM_SLOC_FILE_ENTRY = 1, SM_SLOC_BUFFER_ENTRY = 2, SM_SLOC_BUFFER_BLOB = 3, SM_SLOC_EXPANSION_ENTRY = 4 }
 Record types used within a source manager block. More...
enum  PreprocessorRecordTypes { PP_MACRO_OBJECT_LIKE = 1, PP_MACRO_FUNCTION_LIKE = 2, PP_TOKEN = 3 }
 Record types used within a preprocessor block. More...
enum  PreprocessorDetailRecordTypes { PPD_MACRO_EXPANSION = 0, PPD_MACRO_DEFINITION = 1, PPD_INCLUSION_DIRECTIVE = 2 }
 Record types used within a preprocessor detail block. More...
enum  SubmoduleRecordTypes {
  SUBMODULE_METADATA = 0, SUBMODULE_DEFINITION = 1, SUBMODULE_UMBRELLA_HEADER = 2, SUBMODULE_HEADER = 3,
  SUBMODULE_UMBRELLA_DIR = 4, SUBMODULE_IMPORTS = 5, SUBMODULE_EXPORTS = 6, SUBMODULE_REQUIRES = 7
}
 Record types used within a submodule description block. More...
enum  PredefinedTypeIDs {
  PREDEF_TYPE_NULL_ID = 0, PREDEF_TYPE_VOID_ID = 1, PREDEF_TYPE_BOOL_ID = 2, PREDEF_TYPE_CHAR_U_ID = 3,
  PREDEF_TYPE_UCHAR_ID = 4, PREDEF_TYPE_USHORT_ID = 5, PREDEF_TYPE_UINT_ID = 6, PREDEF_TYPE_ULONG_ID = 7,
  PREDEF_TYPE_ULONGLONG_ID = 8, PREDEF_TYPE_CHAR_S_ID = 9, PREDEF_TYPE_SCHAR_ID = 10, PREDEF_TYPE_WCHAR_ID = 11,
  PREDEF_TYPE_SHORT_ID = 12, PREDEF_TYPE_INT_ID = 13, PREDEF_TYPE_LONG_ID = 14, PREDEF_TYPE_LONGLONG_ID = 15,
  PREDEF_TYPE_FLOAT_ID = 16, PREDEF_TYPE_DOUBLE_ID = 17, PREDEF_TYPE_LONGDOUBLE_ID = 18, PREDEF_TYPE_OVERLOAD_ID = 19,
  PREDEF_TYPE_DEPENDENT_ID = 20, PREDEF_TYPE_UINT128_ID = 21, PREDEF_TYPE_INT128_ID = 22, PREDEF_TYPE_NULLPTR_ID = 23,
  PREDEF_TYPE_CHAR16_ID = 24, PREDEF_TYPE_CHAR32_ID = 25, PREDEF_TYPE_OBJC_ID = 26, PREDEF_TYPE_OBJC_CLASS = 27,
  PREDEF_TYPE_OBJC_SEL = 28, PREDEF_TYPE_UNKNOWN_ANY = 29, PREDEF_TYPE_BOUND_MEMBER = 30, PREDEF_TYPE_AUTO_DEDUCT = 31,
  PREDEF_TYPE_AUTO_RREF_DEDUCT = 32, PREDEF_TYPE_HALF_ID = 33, PREDEF_TYPE_ARC_UNBRIDGED_CAST = 34, PREDEF_TYPE_PSEUDO_OBJECT = 35
}
 Predefined type IDs. More...
enum  TypeCode {
  TYPE_EXT_QUAL = 1, TYPE_COMPLEX = 3, TYPE_POINTER = 4, TYPE_BLOCK_POINTER = 5,
  TYPE_LVALUE_REFERENCE = 6, TYPE_RVALUE_REFERENCE = 7, TYPE_MEMBER_POINTER = 8, TYPE_CONSTANT_ARRAY = 9,
  TYPE_INCOMPLETE_ARRAY = 10, TYPE_VARIABLE_ARRAY = 11, TYPE_VECTOR = 12, TYPE_EXT_VECTOR = 13,
  TYPE_FUNCTION_NO_PROTO = 14, TYPE_FUNCTION_PROTO = 15, TYPE_TYPEDEF = 16, TYPE_TYPEOF_EXPR = 17,
  TYPE_TYPEOF = 18, TYPE_RECORD = 19, TYPE_ENUM = 20, TYPE_OBJC_INTERFACE = 21,
  TYPE_OBJC_OBJECT_POINTER = 22, TYPE_DECLTYPE = 23, TYPE_ELABORATED = 24, TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
  TYPE_UNRESOLVED_USING = 26, TYPE_INJECTED_CLASS_NAME = 27, TYPE_OBJC_OBJECT = 28, TYPE_TEMPLATE_TYPE_PARM = 29,
  TYPE_TEMPLATE_SPECIALIZATION = 30, TYPE_DEPENDENT_NAME = 31, TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32, TYPE_DEPENDENT_SIZED_ARRAY = 33,
  TYPE_PAREN = 34, TYPE_PACK_EXPANSION = 35, TYPE_ATTRIBUTED = 36, TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37,
  TYPE_AUTO = 38, TYPE_UNARY_TRANSFORM = 39, TYPE_ATOMIC = 40
}
 Record codes for each kind of type. More...
enum  SpecialTypeIDs {
  SPECIAL_TYPE_BUILTIN_VA_LIST = 0, SPECIAL_TYPE_CF_CONSTANT_STRING = 1, SPECIAL_TYPE_FILE = 2, SPECIAL_TYPE_JMP_BUF = 3,
  SPECIAL_TYPE_SIGJMP_BUF = 4, SPECIAL_TYPE_OBJC_ID_REDEFINITION = 5, SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 6, SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 7,
  SPECIAL_TYPE_UCONTEXT_T = 8
}
 The type IDs for special types constructed by semantic analysis. More...
enum  PredefinedDeclIDs {
  PREDEF_DECL_NULL_ID = 0, PREDEF_DECL_TRANSLATION_UNIT_ID = 1, PREDEF_DECL_OBJC_ID_ID = 2, PREDEF_DECL_OBJC_SEL_ID = 3,
  PREDEF_DECL_OBJC_CLASS_ID = 4, PREDEF_DECL_OBJC_PROTOCOL_ID = 5, PREDEF_DECL_INT_128_ID = 6, PREDEF_DECL_UNSIGNED_INT_128_ID = 7,
  PREDEF_DECL_OBJC_INSTANCETYPE_ID = 8
}
 Predefined declaration IDs. More...
enum  DeclCode {
  DECL_TYPEDEF = 51, DECL_TYPEALIAS, DECL_ENUM, DECL_RECORD,
  DECL_ENUM_CONSTANT, DECL_FUNCTION, DECL_OBJC_METHOD, DECL_OBJC_INTERFACE,
  DECL_OBJC_PROTOCOL, DECL_OBJC_IVAR, DECL_OBJC_AT_DEFS_FIELD, DECL_OBJC_CATEGORY,
  DECL_OBJC_CATEGORY_IMPL, DECL_OBJC_IMPLEMENTATION, DECL_OBJC_COMPATIBLE_ALIAS, DECL_OBJC_PROPERTY,
  DECL_OBJC_PROPERTY_IMPL, DECL_FIELD, DECL_VAR, DECL_IMPLICIT_PARAM,
  DECL_PARM_VAR, DECL_FILE_SCOPE_ASM, DECL_BLOCK, DECL_CONTEXT_LEXICAL,
  DECL_CONTEXT_VISIBLE, DECL_LABEL, DECL_NAMESPACE, DECL_NAMESPACE_ALIAS,
  DECL_USING, DECL_USING_SHADOW, DECL_USING_DIRECTIVE, DECL_UNRESOLVED_USING_VALUE,
  DECL_UNRESOLVED_USING_TYPENAME, DECL_LINKAGE_SPEC, DECL_CXX_RECORD, DECL_CXX_METHOD,
  DECL_CXX_CONSTRUCTOR, DECL_CXX_DESTRUCTOR, DECL_CXX_CONVERSION, DECL_ACCESS_SPEC,
  DECL_FRIEND, DECL_FRIEND_TEMPLATE, DECL_CLASS_TEMPLATE, DECL_CLASS_TEMPLATE_SPECIALIZATION,
  DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION, DECL_FUNCTION_TEMPLATE, DECL_TEMPLATE_TYPE_PARM, DECL_NON_TYPE_TEMPLATE_PARM,
  DECL_TEMPLATE_TEMPLATE_PARM, DECL_TYPE_ALIAS_TEMPLATE, DECL_STATIC_ASSERT, DECL_CXX_BASE_SPECIFIERS,
  DECL_INDIRECTFIELD, DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK, DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION, DECL_IMPORT
}
 Record codes for each kind of declaration. More...
enum  StmtCode {
  STMT_STOP = 100, STMT_NULL_PTR, STMT_REF_PTR, STMT_NULL,
  STMT_COMPOUND, STMT_CASE, STMT_DEFAULT, STMT_LABEL,
  STMT_ATTRIBUTED, STMT_IF, STMT_SWITCH, STMT_WHILE,
  STMT_DO, STMT_FOR, STMT_GOTO, STMT_INDIRECT_GOTO,
  STMT_CONTINUE, STMT_BREAK, STMT_RETURN, STMT_DECL,
  STMT_ASM, EXPR_PREDEFINED, EXPR_DECL_REF, EXPR_INTEGER_LITERAL,
  EXPR_FLOATING_LITERAL, EXPR_IMAGINARY_LITERAL, EXPR_STRING_LITERAL, EXPR_CHARACTER_LITERAL,
  EXPR_PAREN, EXPR_PAREN_LIST, EXPR_UNARY_OPERATOR, EXPR_OFFSETOF,
  EXPR_SIZEOF_ALIGN_OF, EXPR_ARRAY_SUBSCRIPT, EXPR_CALL, EXPR_MEMBER,
  EXPR_BINARY_OPERATOR, EXPR_COMPOUND_ASSIGN_OPERATOR, EXPR_CONDITIONAL_OPERATOR, EXPR_IMPLICIT_CAST,
  EXPR_CSTYLE_CAST, EXPR_COMPOUND_LITERAL, EXPR_EXT_VECTOR_ELEMENT, EXPR_INIT_LIST,
  EXPR_DESIGNATED_INIT, EXPR_IMPLICIT_VALUE_INIT, EXPR_VA_ARG, EXPR_ADDR_LABEL,
  EXPR_STMT, EXPR_CHOOSE, EXPR_GNU_NULL, EXPR_SHUFFLE_VECTOR,
  EXPR_BLOCK, EXPR_GENERIC_SELECTION, EXPR_PSEUDO_OBJECT, EXPR_ATOMIC,
  EXPR_OBJC_STRING_LITERAL, EXPR_OBJC_BOXED_EXPRESSION, EXPR_OBJC_ARRAY_LITERAL, EXPR_OBJC_DICTIONARY_LITERAL,
  EXPR_OBJC_ENCODE, EXPR_OBJC_SELECTOR_EXPR, EXPR_OBJC_PROTOCOL_EXPR, EXPR_OBJC_IVAR_REF_EXPR,
  EXPR_OBJC_PROPERTY_REF_EXPR, EXPR_OBJC_SUBSCRIPT_REF_EXPR, EXPR_OBJC_KVC_REF_EXPR, EXPR_OBJC_MESSAGE_EXPR,
  EXPR_OBJC_ISA, EXPR_OBJC_INDIRECT_COPY_RESTORE, STMT_OBJC_FOR_COLLECTION, STMT_OBJC_CATCH,
  STMT_OBJC_FINALLY, STMT_OBJC_AT_TRY, STMT_OBJC_AT_SYNCHRONIZED, STMT_OBJC_AT_THROW,
  STMT_OBJC_AUTORELEASE_POOL, EXPR_OBJC_BOOL_LITERAL, STMT_CXX_CATCH, STMT_CXX_TRY,
  STMT_CXX_FOR_RANGE, EXPR_CXX_OPERATOR_CALL, EXPR_CXX_MEMBER_CALL, EXPR_CXX_CONSTRUCT,
  EXPR_CXX_TEMPORARY_OBJECT, EXPR_CXX_STATIC_CAST, EXPR_CXX_DYNAMIC_CAST, EXPR_CXX_REINTERPRET_CAST,
  EXPR_CXX_CONST_CAST, EXPR_CXX_FUNCTIONAL_CAST, EXPR_USER_DEFINED_LITERAL, EXPR_CXX_BOOL_LITERAL,
  EXPR_CXX_NULL_PTR_LITERAL, EXPR_CXX_TYPEID_EXPR, EXPR_CXX_TYPEID_TYPE, EXPR_CXX_THIS,
  EXPR_CXX_THROW, EXPR_CXX_DEFAULT_ARG, EXPR_CXX_BIND_TEMPORARY, EXPR_CXX_SCALAR_VALUE_INIT,
  EXPR_CXX_NEW, EXPR_CXX_DELETE, EXPR_CXX_PSEUDO_DESTRUCTOR, EXPR_EXPR_WITH_CLEANUPS,
  EXPR_CXX_DEPENDENT_SCOPE_MEMBER, EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, EXPR_CXX_UNRESOLVED_CONSTRUCT, EXPR_CXX_UNRESOLVED_MEMBER,
  EXPR_CXX_UNRESOLVED_LOOKUP, EXPR_CXX_UNARY_TYPE_TRAIT, EXPR_CXX_EXPRESSION_TRAIT, EXPR_CXX_NOEXCEPT,
  EXPR_OPAQUE_VALUE, EXPR_BINARY_CONDITIONAL_OPERATOR, EXPR_BINARY_TYPE_TRAIT, EXPR_TYPE_TRAIT,
  EXPR_ARRAY_TYPE_TRAIT, EXPR_PACK_EXPANSION, EXPR_SIZEOF_PACK, EXPR_SUBST_NON_TYPE_TEMPLATE_PARM,
  EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK, EXPR_MATERIALIZE_TEMPORARY, EXPR_CUDA_KERNEL_CALL, EXPR_ASTYPE,
  EXPR_CXX_UUIDOF_EXPR, EXPR_CXX_UUIDOF_TYPE, STMT_SEH_EXCEPT, STMT_SEH_FINALLY,
  STMT_SEH_TRY, EXPR_OBJC_BRIDGED_CAST, STMT_MS_DEPENDENT_EXISTS, EXPR_LAMBDA
}
 Record codes for each kind of statement or expression. More...
enum  DesignatorTypes { DESIG_FIELD_NAME = 0, DESIG_FIELD_DECL = 1, DESIG_ARRAY = 2, DESIG_ARRAY_RANGE = 3 }
 The kinds of designators that can occur in a DesignatedInitExpr. More...
enum  CtorInitializerType { CTOR_INITIALIZER_BASE, CTOR_INITIALIZER_DELEGATING, CTOR_INITIALIZER_MEMBER, CTOR_INITIALIZER_INDIRECT_MEMBER }
 The different kinds of data that can occur in a CtorInitializer. More...
enum  ModuleKind { MK_Module, MK_PCH, MK_Preamble, MK_MainFile }
 Specifies the kind of module that has been loaded. More...
enum  DeclUpdateKind { UPD_CXX_ADDED_IMPLICIT_MEMBER, UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION, UPD_CXX_ADDED_ANONYMOUS_NAMESPACE, UPD_CXX_INSTANTIATED_STATIC_DATA_MEMBER }

Functions

TypeIdx TypeIdxFromBuiltin (const BuiltinType *BT)
template<typename IdxForTypeTy >
TypeID MakeTypeID (ASTContext &Context, QualType T, IdxForTypeTy IdxForType)
unsigned ComputeHash (Selector Sel)

Variables

const unsigned VERSION_MAJOR = 4
 AST file major version number supported by this version of Clang.
const unsigned VERSION_MINOR = 0
 AST file minor version number supported by this version of Clang.
const unsigned int NUM_PREDEF_IDENT_IDS = 1
 The number of predefined identifier IDs.
const unsigned int NUM_PREDEF_SELECTOR_IDS = 1
 The number of predefined selector IDs.
const unsigned int NUM_PREDEF_SUBMODULE_IDS = 1
 The number of predefined submodule IDs.
const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1
 The number of predefined preprocessed entity IDs.
const unsigned NUM_PREDEF_TYPE_IDS = 100
 The number of predefined type IDs that are reserved for the PREDEF_TYPE_* constants.
const unsigned NUM_ALLOWED_ABBREVS_SIZE = 4
 The number of allowed abbreviations in bits.
const unsigned NumSpecialTypeIDs = 9
 The number of special type IDs.
const unsigned int NUM_PREDEF_DECL_IDS = 9
 The number of declaration IDs that are predefined.

Typedef Documentation

An ID number that refers to a set of CXXBaseSpecifiers in an AST file.

Definition at line 138 of file ASTBitCodes.h.

typedef uint32_t clang::serialization::DeclID

An ID number that refers to a declaration in an AST file.

The ID numbers of declarations are consecutive (in order of discovery), with values below NUM_PREDEF_DECL_IDS being reserved. At the start of a chain of precompiled headers, declaration ID 1 is used for the translation unit declaration.

Definition at line 62 of file ASTBitCodes.h.

Definition at line 70 of file ASTBitCodes.h.

An ID number that refers to an identifier in an AST file.

Definition at line 125 of file ASTBitCodes.h.

An ID number that refers to an identifier in an AST file.

The ID numbers of identifiers are consecutive (in order of discovery) and start at 1. 0 is reserved for NULL.

Definition at line 54 of file ASTBitCodes.h.

typedef std::pair<uint32_t, DeclID> clang::serialization::KindDeclIDPair

a Decl::Kind/DeclID pair.

Definition at line 65 of file ASTBitCodes.h.

Definition at line 69 of file ASTBitCodes.h.

An ID number that refers to an entity in the detailed preprocessing record.

Definition at line 142 of file ASTBitCodes.h.

An ID number that refers to an ObjC selector in an AST file.

Definition at line 131 of file ASTBitCodes.h.

An ID number that refers to a submodule in a module file.

Definition at line 145 of file ASTBitCodes.h.

typedef uint32_t clang::serialization::TypeID

An ID number that refers to a type in an AST file.

The ID of a type is partitioned into two parts: the lower three bits are used to store the const/volatile/restrict qualifiers (as with QualType) and the upper bits provide a type index. The type index values are partitioned into two sets. The values below NUM_PREDEF_TYPE_IDs are predefined type IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are other types that have serialized representations.

Definition at line 82 of file ASTBitCodes.h.


Enumeration Type Documentation

Record types that occur within the AST block itself.

Enumerator:
TYPE_OFFSET 

Record code for the offsets of each type.

The TYPE_OFFSET constant describes the record that occurs within the AST block. The record itself is an array of offsets that point into the declarations and types block (identified by DECLTYPES_BLOCK_ID). The index into the array is based on the ID of a type. For a given type ID T, the lower three bits of T are its qualifiers (const, volatile, restrict), as in the QualType class. The upper bits, after being shifted and subtracting NUM_PREDEF_TYPE_IDS, are used to index into the TYPE_OFFSET block to determine the offset of that type's corresponding record within the DECLTYPES_BLOCK_ID block.

DECL_OFFSET 

Record code for the offsets of each decl.

The DECL_OFFSET constant describes the record that occurs within the block identified by DECL_OFFSETS_BLOCK_ID within the AST block. The record itself is an array of offsets that point into the declarations and types block (identified by DECLTYPES_BLOCK_ID). The declaration ID is an index into this record, after subtracting one to account for the use of declaration ID 0 for a NULL declaration pointer. Index 0 is reserved for the translation unit declaration.

LANGUAGE_OPTIONS 

Record code for the language options table.

The record with this code contains the contents of the LangOptions structure. We serialize the entire contents of the structure, and let the reader decide which options are actually important to check.

METADATA 

AST file metadata, including the AST file version number and the target triple used to build the AST file.

IDENTIFIER_OFFSET 

Record code for the table of offsets of each identifier ID.

The offset table contains offsets into the blob stored in the IDENTIFIER_TABLE record. Each offset points to the NULL-terminated string that corresponds to that identifier.

IDENTIFIER_TABLE 

Record code for the identifier table.

The identifier table is a simple blob that contains NULL-terminated strings for all of the identifiers referenced by the AST file. The IDENTIFIER_OFFSET table contains the mapping from identifier IDs to the characters in this blob. Note that the starting offsets of all of the identifiers are odd, so that, when the identifier offset table is loaded in, we can use the low bit to distinguish between offsets (for unresolved identifier IDs) and IdentifierInfo pointers (for already-resolved identifier IDs).

EXTERNAL_DEFINITIONS 

Record code for the array of external definitions.

The AST file contains a list of all of the unnamed external definitions present within the parsed headers, stored as an array of declaration IDs. These external definitions will be reported to the AST consumer after the AST file has been read, since their presence can affect the semantics of the program (e.g., for code generation).

SPECIAL_TYPES 

Record code for the set of non-builtin, special types.

This record contains the type IDs for the various type nodes that are constructed during semantic analysis (e.g., __builtin_va_list). The SPECIAL_TYPE_* constants provide offsets into this record.

STATISTICS 

Record code for the extra statistics we gather while generating an AST file.

TENTATIVE_DEFINITIONS 

Record code for the array of tentative definitions.

LOCALLY_SCOPED_EXTERNAL_DECLS 

Record code for the array of locally-scoped external declarations.

SELECTOR_OFFSETS 

Record code for the table of offsets into the Objective-C method pool.

METHOD_POOL 

Record code for the Objective-C method pool,.

PP_COUNTER_VALUE 

The value of the next __COUNTER__ to dispense. [PP_COUNTER_VALUE, Val].

SOURCE_LOCATION_OFFSETS 

Record code for the table of offsets into the block of source-location information.

SOURCE_LOCATION_PRELOADS 

Record code for the set of source location entries that need to be preloaded by the AST reader.

This set contains the source location entry for the predefines buffer and for any file entries that need to be preloaded.

STAT_CACHE 

Record code for the stat() cache.

EXT_VECTOR_DECLS 

Record code for the set of ext_vector type names.

ORIGINAL_FILE_NAME 

Record code for the original file that was used to generate the AST file.

ORIGINAL_FILE_ID 

Record code for the file ID of the original file used to generate the AST file.

VERSION_CONTROL_BRANCH_REVISION 

Record code for the version control branch and revision information of the compiler used to build this AST file.

UNUSED_FILESCOPED_DECLS 

Record code for the array of unused file scoped decls.

PPD_ENTITIES_OFFSETS 

Record code for the table of offsets to entries in the preprocessing record.

VTABLE_USES 

Record code for the array of VTable uses.

DYNAMIC_CLASSES 

Record code for the array of dynamic classes.

IMPORTS 

Record code for the list of other AST files imported by this AST file.

REFERENCED_SELECTOR_POOL 

Record code for referenced selector pool.

TU_UPDATE_LEXICAL 

Record code for an update to the TU's lexically contained declarations.

LOCAL_REDECLARATIONS_MAP 

Record code for the array describing the locations (in the LOCAL_REDECLARATIONS record) of the redeclaration chains, indexed by the first known ID.

SEMA_DECL_REFS 

Record code for declarations that Sema keeps references of.

WEAK_UNDECLARED_IDENTIFIERS 

Record code for weak undeclared identifiers.

PENDING_IMPLICIT_INSTANTIATIONS 

Record code for pending implicit instantiations.

DECL_REPLACEMENTS 

Record code for a decl replacement block.

If a declaration is modified after having been deserialized, and then written to a dependent AST file, its ID and offset must be added to the replacement block.

UPDATE_VISIBLE 

Record code for an update to a decl context's lookup table.

In practice, this should only be used for the TU and namespaces.

DECL_UPDATE_OFFSETS 

Record for offsets of DECL_UPDATES records for declarations that were modified after being deserialized and need updates.

DECL_UPDATES 

Record of updates for a declaration that was modified after being deserialized.

CXX_BASE_SPECIFIER_OFFSETS 

Record code for the table of offsets to CXXBaseSpecifier sets.

DIAG_PRAGMA_MAPPINGS 

Record code for #pragma diagnostic mappings.

CUDA_SPECIAL_DECL_REFS 

Record code for special CUDA declarations.

HEADER_SEARCH_TABLE 

Record code for header search information.

ORIGINAL_PCH_DIR 

The directory that the PCH was originally created in.

FP_PRAGMA_OPTIONS 

Record code for floating point #pragma options.

OPENCL_EXTENSIONS 

Record code for enabled OpenCL extensions.

DELEGATING_CTORS 

The list of delegating constructor declarations.

FILE_SOURCE_LOCATION_OFFSETS 

Record code for the table of offsets into the block of file source-location information.

KNOWN_NAMESPACES 

Record code for the set of known namespaces, which are used for typo correction.

MODULE_OFFSET_MAP 

Record code for the remapping information used to relate loaded modules to the various offsets and IDs(e.g., source location offests, declaration and type IDs) that are used in that module to refer to other modules.

SOURCE_MANAGER_LINE_TABLE 

Record code for the source manager line table information, which stores information about #line directives.

OBJC_CATEGORIES_MAP 

Record code for map of Objective-C class definition IDs to the ObjC categories in a module that are attached to that class.

FILE_SORTED_DECLS 

Record code for a file sorted array of DeclIDs in a module.

IMPORTED_MODULES 

Record code for an array of all of the (sub)modules that were imported by the AST file.

MERGED_DECLARATIONS 

Record code for the set of merged declarations in an AST file.

LOCAL_REDECLARATIONS 

Record code for the array of redeclaration chains.

This array can only be interpreted properly using the local redeclarations map.

OBJC_CATEGORIES 

Record code for the array of Objective-C categories (including extensions).

This array can only be interpreted properly using the Objective-C categories map.

Definition at line 214 of file ASTBitCodes.h.

Describes the various kinds of blocks that occur within an AST file.

Enumerator:
AST_BLOCK_ID 

The AST block, which acts as a container around the full AST block.

SOURCE_MANAGER_BLOCK_ID 

The block containing information about the source manager.

PREPROCESSOR_BLOCK_ID 

The block containing information about the preprocessor.

DECLTYPES_BLOCK_ID 

The block containing the definitions of all of the types and decls used within the AST file.

DECL_UPDATES_BLOCK_ID 

The block containing DECL_UPDATES records.

PREPROCESSOR_DETAIL_BLOCK_ID 

The block containing the detailed preprocessing record.

SUBMODULE_BLOCK_ID 

The block containing the submodule structure.

Definition at line 186 of file ASTBitCodes.h.

Enumerator:
UPD_CXX_ADDED_IMPLICIT_MEMBER 
UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION 
UPD_CXX_ADDED_ANONYMOUS_NAMESPACE 
UPD_CXX_INSTANTIATED_STATIC_DATA_MEMBER 

Definition at line 24 of file ASTCommon.h.

Specifies the kind of module that has been loaded.

Enumerator:
MK_Module 

File is a module proper.

MK_PCH 

File is a PCH file treated as such.

MK_Preamble 

File is a PCH file treated as the preamble.

MK_MainFile 

File is a PCH file treated as the actual main file.

Definition at line 39 of file Serialization/Module.h.

Record types used within a preprocessor detail block.

Enumerator:
PPD_MACRO_EXPANSION 

Describes a macro expansion within the preprocessing record.

PPD_MACRO_DEFINITION 

Describes a macro definition within the preprocessing record.

PPD_INCLUSION_DIRECTIVE 

Describes an inclusion directive within the preprocessing record.

Definition at line 513 of file ASTBitCodes.h.

Record types used within a preprocessor block.

Enumerator:
PP_MACRO_OBJECT_LIKE 

An object-like macro definition. [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed].

PP_MACRO_FUNCTION_LIKE 

A function-like macro definition. [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars, NumArgs, ArgIdentInfoID* ].

PP_TOKEN 

Describes one token. [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags].

Definition at line 494 of file ASTBitCodes.h.

Record types used within a source manager block.

Enumerator:
SM_SLOC_FILE_ENTRY 

Describes a source location entry (SLocEntry) for a file.

SM_SLOC_BUFFER_ENTRY 

Describes a source location entry (SLocEntry) for a buffer.

SM_SLOC_BUFFER_BLOB 

Describes a blob that contains the data for a buffer entry. This kind of record always directly follows a SM_SLOC_BUFFER_ENTRY record or a SM_SLOC_FILE_ENTRY with an overridden buffer.

SM_SLOC_EXPANSION_ENTRY 

Describes a source location entry (SLocEntry) for a macro expansion.

Definition at line 476 of file ASTBitCodes.h.

Record types used within a submodule description block.

Enumerator:
SUBMODULE_METADATA 

Metadata for submodules as a whole.

SUBMODULE_DEFINITION 

Defines the major attributes of a submodule, including its name and parent.

SUBMODULE_UMBRELLA_HEADER 

Specifies the umbrella header used to create this module, if any.

SUBMODULE_HEADER 

Specifies a header that falls into this (sub)module.

SUBMODULE_UMBRELLA_DIR 

Specifies an umbrella directory.

SUBMODULE_IMPORTS 

Specifies the submodules that are imported by this submodule.

SUBMODULE_EXPORTS 

Specifies the submodules that are re-exported from this submodule.

SUBMODULE_REQUIRES 

Specifies a required feature.

Definition at line 526 of file ASTBitCodes.h.


Function Documentation

unsigned clang::serialization::ComputeHash ( Selector  Sel)
template<typename IdxForTypeTy >
TypeID clang::serialization::MakeTypeID ( ASTContext &  Context,
QualType  T,
IdxForTypeTy  IdxForType 
)
serialization::TypeIdx clang::serialization::TypeIdxFromBuiltin ( const BuiltinType BT)

Variable Documentation

The number of predefined identifier IDs.

Definition at line 128 of file ASTBitCodes.h.

Referenced by clang::ASTReader::getGlobalIdentifierID(), and clang::ASTWriter::ReaderInitialized().

The number of predefined preprocessed entity IDs.

Definition at line 182 of file ASTBitCodes.h.

Referenced by clang::ASTReader::getGlobalPreprocessedEntityID().

The number of predefined selector IDs.

Definition at line 134 of file ASTBitCodes.h.

Referenced by clang::ASTReader::DecodeSelector(), clang::ASTReader::getGlobalSelectorID(), and clang::ASTWriter::ReaderInitialized().

The number of predefined submodule IDs.

Definition at line 148 of file ASTBitCodes.h.

Referenced by clang::ASTReader::getSubmodule(), and clang::ASTWriter::ReaderInitialized().

AST file major version number supported by this version of Clang.

Whenever the AST file format changes in a way that makes it incompatible with previous versions (such that a reader designed for the previous version could not support reading the new version), this number should be increased.

Version 4 of AST files also requires that the version control branch and revision match exactly, since there is no backward compatibility of AST files at this time.

Definition at line 38 of file ASTBitCodes.h.

AST file minor version number supported by this version of Clang.

Whenever the AST format changes in a way that is still compatible with previous versions (such that a reader designed for the previous version could still support reading the new version by ignoring new kinds of subblocks), this number should be increased.

Definition at line 48 of file ASTBitCodes.h.