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  InputFile
 The input file that has been loaded from this AST file, along with bools indicating whether this was an overridden buffer or if it was out-of-date or not-found. 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 MacroID
 An ID number that refers to a macro in an AST file.
typedef uint32_t GlobalMacroID
 A global ID number that refers to a macro in an AST file.
typedef uint32_t LocalMacroID
 A local to a module ID number that refers to a macro 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.
typedef unsigned ASTFileSignature

Enumerations

enum  BlockIDs {
  AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID, SOURCE_MANAGER_BLOCK_ID, PREPROCESSOR_BLOCK_ID, DECLTYPES_BLOCK_ID,
  PREPROCESSOR_DETAIL_BLOCK_ID, SUBMODULE_BLOCK_ID, COMMENTS_BLOCK_ID, CONTROL_BLOCK_ID,
  INPUT_FILES_BLOCK_ID
}
 Describes the various kinds of blocks that occur within an AST file. More...
enum  ControlRecordTypes {
  METADATA = 1, IMPORTS = 2, LANGUAGE_OPTIONS = 3, TARGET_OPTIONS = 4,
  ORIGINAL_FILE = 5, ORIGINAL_PCH_DIR = 6, ORIGINAL_FILE_ID = 7, INPUT_FILE_OFFSETS = 8,
  DIAGNOSTIC_OPTIONS = 9, FILE_SYSTEM_OPTIONS = 10, HEADER_SEARCH_OPTIONS = 11, PREPROCESSOR_OPTIONS = 12,
  MODULE_NAME = 13, MODULE_MAP_FILE = 14, SIGNATURE = 15
}
 Record types that occur within the control block. More...
enum  InputFileRecordTypes { INPUT_FILE = 1 }
 Record types that occur within the input-files block inside the control block. More...
enum  ASTRecordTypes {
  TYPE_OFFSET = 1, DECL_OFFSET = 2, IDENTIFIER_OFFSET = 3, METADATA_OLD_FORMAT = 4,
  IDENTIFIER_TABLE = 5, EAGERLY_DESERIALIZED_DECLS = 6, SPECIAL_TYPES = 7, STATISTICS = 8,
  TENTATIVE_DEFINITIONS = 9, LOCALLY_SCOPED_EXTERN_C_DECLS = 10, SELECTOR_OFFSETS = 11, METHOD_POOL = 12,
  PP_COUNTER_VALUE = 13, SOURCE_LOCATION_OFFSETS = 14, SOURCE_LOCATION_PRELOADS = 15, EXT_VECTOR_DECLS = 16,
  UNUSED_FILESCOPED_DECLS = 17, PPD_ENTITIES_OFFSETS = 18, VTABLE_USES = 19, DYNAMIC_CLASSES = 20,
  REFERENCED_SELECTOR_POOL = 21, TU_UPDATE_LEXICAL = 22, LOCAL_REDECLARATIONS_MAP = 23, SEMA_DECL_REFS = 24,
  WEAK_UNDECLARED_IDENTIFIERS = 25, PENDING_IMPLICIT_INSTANTIATIONS = 26, DECL_REPLACEMENTS = 27, UPDATE_VISIBLE = 28,
  DECL_UPDATE_OFFSETS = 29, DECL_UPDATES = 30, CXX_BASE_SPECIFIER_OFFSETS = 31, DIAG_PRAGMA_MAPPINGS = 32,
  CUDA_SPECIAL_DECL_REFS = 33, HEADER_SEARCH_TABLE = 34, FP_PRAGMA_OPTIONS = 35, OPENCL_EXTENSIONS = 36,
  DELEGATING_CTORS = 37, KNOWN_NAMESPACES = 38, MODULE_OFFSET_MAP = 39, SOURCE_MANAGER_LINE_TABLE = 40,
  OBJC_CATEGORIES_MAP = 41, FILE_SORTED_DECLS = 42, IMPORTED_MODULES = 43, MERGED_DECLARATIONS = 44,
  LOCAL_REDECLARATIONS = 45, OBJC_CATEGORIES = 46, MACRO_OFFSET = 47, MACRO_TABLE = 48,
  UNDEFINED_BUT_USED = 49, LATE_PARSED_TEMPLATE = 50, OPTIMIZE_PRAGMA_OPTIONS = 51, UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES = 52
}
 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, PP_MACRO_DIRECTIVE_HISTORY = 4 }
 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_TOPHEADER = 4, SUBMODULE_UMBRELLA_DIR = 5, SUBMODULE_IMPORTS = 6, SUBMODULE_EXPORTS = 7,
  SUBMODULE_REQUIRES = 8, SUBMODULE_EXCLUDED_HEADER = 9, SUBMODULE_LINK_LIBRARY = 10, SUBMODULE_CONFIG_MACRO = 11,
  SUBMODULE_CONFLICT = 12, SUBMODULE_PRIVATE_HEADER = 13, SUBMODULE_TEXTUAL_HEADER = 14, SUBMODULE_PRIVATE_TEXTUAL_HEADER = 15
}
 Record types used within a submodule description block. More...
enum  CommentRecordTypes { COMMENTS_RAW_COMMENT = 0 }
 Record types used within a comments 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,
  PREDEF_TYPE_VA_LIST_TAG = 36, PREDEF_TYPE_BUILTIN_FN = 37, PREDEF_TYPE_IMAGE1D_ID = 38, PREDEF_TYPE_IMAGE1D_ARR_ID = 39,
  PREDEF_TYPE_IMAGE1D_BUFF_ID = 40, PREDEF_TYPE_IMAGE2D_ID = 41, PREDEF_TYPE_IMAGE2D_ARR_ID = 42, PREDEF_TYPE_IMAGE3D_ID = 43,
  PREDEF_TYPE_EVENT_ID = 44, PREDEF_TYPE_SAMPLER_ID = 45
}
 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, TYPE_DECAYED = 41,
  TYPE_ADJUSTED = 42
}
 Record codes for each kind of type. More...
enum  SpecialTypeIDs {
  SPECIAL_TYPE_CF_CONSTANT_STRING = 0, SPECIAL_TYPE_FILE = 1, SPECIAL_TYPE_JMP_BUF = 2, SPECIAL_TYPE_SIGJMP_BUF = 3,
  SPECIAL_TYPE_OBJC_ID_REDEFINITION = 4, SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 5, SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 6, SPECIAL_TYPE_UCONTEXT_T = 7
}
 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, PREDEF_DECL_BUILTIN_VA_LIST_ID = 9
}
 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_MS_PROPERTY, DECL_VAR,
  DECL_IMPLICIT_PARAM, DECL_PARM_VAR, DECL_FILE_SCOPE_ASM, DECL_BLOCK,
  DECL_CAPTURED, 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_VAR_TEMPLATE,
  DECL_VAR_TEMPLATE_SPECIALIZATION, DECL_VAR_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_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK,
  DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION, DECL_IMPORT, DECL_OMP_THREADPRIVATE, DECL_EMPTY
}
 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_CAPTURED, STMT_GCCASM, STMT_MSASM, 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_CONVERT_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_STD_INITIALIZER_LIST, 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_DEFAULT_INIT, 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_EXPRESSION_TRAIT, EXPR_CXX_NOEXCEPT,
  EXPR_OPAQUE_VALUE, EXPR_BINARY_CONDITIONAL_OPERATOR, 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_FUNCTION_PARM_PACK, EXPR_MATERIALIZE_TEMPORARY, EXPR_CXX_FOLD, EXPR_CUDA_KERNEL_CALL,
  EXPR_ASTYPE, EXPR_CXX_PROPERTY_REF_EXPR, EXPR_CXX_UUIDOF_EXPR, EXPR_CXX_UUIDOF_TYPE,
  STMT_SEH_LEAVE, STMT_SEH_EXCEPT, STMT_SEH_FINALLY, STMT_SEH_TRY,
  STMT_OMP_PARALLEL_DIRECTIVE, STMT_OMP_SIMD_DIRECTIVE, STMT_OMP_FOR_DIRECTIVE, STMT_OMP_FOR_SIMD_DIRECTIVE,
  STMT_OMP_SECTIONS_DIRECTIVE, STMT_OMP_SECTION_DIRECTIVE, STMT_OMP_SINGLE_DIRECTIVE, STMT_OMP_MASTER_DIRECTIVE,
  STMT_OMP_CRITICAL_DIRECTIVE, STMT_OMP_PARALLEL_FOR_DIRECTIVE, STMT_OMP_PARALLEL_FOR_SIMD_DIRECTIVE, STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE,
  STMT_OMP_TASK_DIRECTIVE, STMT_OMP_TASKYIELD_DIRECTIVE, STMT_OMP_BARRIER_DIRECTIVE, STMT_OMP_TASKWAIT_DIRECTIVE,
  STMT_OMP_FLUSH_DIRECTIVE, STMT_OMP_ORDERED_DIRECTIVE, STMT_OMP_ATOMIC_DIRECTIVE, STMT_OMP_TARGET_DIRECTIVE,
  STMT_OMP_TEAMS_DIRECTIVE, 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_ImplicitModule, MK_ExplicitModule, 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_ADDED_FUNCTION_DEFINITION,
  UPD_CXX_INSTANTIATED_STATIC_DATA_MEMBER, UPD_CXX_INSTANTIATED_CLASS_DEFINITION, UPD_CXX_RESOLVED_EXCEPTION_SPEC, UPD_CXX_DEDUCED_RETURN_TYPE,
  UPD_DECL_MARKED_USED, UPD_MANGLING_NUMBER, UPD_STATIC_LOCAL_NUMBER, UPD_DECL_MARKED_OPENMP_THREADPRIVATE
}

Functions

TypeIdx TypeIdxFromBuiltin (const BuiltinType *BT)
template<typename IdxForTypeTy >
TypeID MakeTypeID (ASTContext &Context, QualType T, IdxForTypeTy IdxForType)
unsigned ComputeHash (Selector Sel)
const DeclContextgetDefinitiveDeclContext (const DeclContext *DC)
 Retrieve the "definitive" declaration that provides all of the visible entries for the given declaration context, if there is one.
bool isRedeclarableDeclKind (unsigned Kind)
 Determine whether the given declaration kind is redeclarable.
bool needsAnonymousDeclarationNumber (const NamedDecl *D)
 Determine whether the given declaration needs an anonymous declaration number.

Variables

const unsigned VERSION_MAJOR = 5
 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_MACRO_IDS = 1
 The number of predefined macro 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 NumSpecialTypeIDs = 8
 The number of special type IDs.
const unsigned int NUM_PREDEF_DECL_IDS = 10
 The number of declaration IDs that are predefined.

Typedef Documentation

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

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

Definition at line 151 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.

A global ID number that refers to a macro in an AST file.

Definition at line 134 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.

A local to a module ID number that refers to a macro in an AST file.

Definition at line 138 of file ASTBitCodes.h.

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

Definition at line 131 of file ASTBitCodes.h.

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

Definition at line 155 of file ASTBitCodes.h.

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

Definition at line 144 of file ASTBitCodes.h.

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

Definition at line 158 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.

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.

METADATA_OLD_FORMAT 

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*.

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).

EAGERLY_DESERIALIZED_DECLS 

Record code for the array of eagerly deserialized decls.

The AST file contains a list of all of the declarations that should be eagerly deserialized present within the parsed headers, stored as an array of declaration IDs. These declarations 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_EXTERN_C_DECLS 

Record code for the array of locally-scoped extern "C" 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.

EXT_VECTOR_DECLS 

Record code for the set of ext_vector type names.

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.

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.

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.

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.

MACRO_OFFSET 

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

The offset table contains offsets into the blob stored in the preprocessor block. Each offset points to the corresponding macro definition.

MACRO_TABLE 

Mapping table from the identifier ID to the offset of the macro directive history for the identifier.

UNDEFINED_BUT_USED 

Record code for undefined but used functions and variables that need a definition in this TU.

LATE_PARSED_TEMPLATE 

Record code for late parsed template functions.

OPTIMIZE_PRAGMA_OPTIONS 

Record code for #pragma optimize options.

UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES 

Record code for potentially unused local typedef names.

Definition at line 305 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.

PREPROCESSOR_DETAIL_BLOCK_ID 

The block containing the detailed preprocessing record.

SUBMODULE_BLOCK_ID 

The block containing the submodule structure.

COMMENTS_BLOCK_ID 

The block containing comments.

CONTROL_BLOCK_ID 

The control block, which contains all of the information that needs to be validated prior to committing to loading the AST file.

INPUT_FILES_BLOCK_ID 

The block of input files, which were used as inputs to create this AST file.

This block is part of the control block.

Definition at line 199 of file ASTBitCodes.h.

Record types used within a comments block.

Enumerator:
COMMENTS_RAW_COMMENT 

Definition at line 654 of file ASTBitCodes.h.

Record types that occur within the control block.

Enumerator:
METADATA 

AST file metadata, including the AST file version number and information about the compiler used to build this AST file.

IMPORTS 

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

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.

TARGET_OPTIONS 

Record code for the target options table.

ORIGINAL_FILE 

Record code for the original file that was used to generate the AST file, including both its file ID and its name.

ORIGINAL_PCH_DIR 

The directory that the PCH was originally created in.

ORIGINAL_FILE_ID 

Record code for file ID of the file or buffer that was used to generate the AST file.

INPUT_FILE_OFFSETS 

Offsets into the input-files block where input files reside.

DIAGNOSTIC_OPTIONS 

Record code for the diagnostic options table.

FILE_SYSTEM_OPTIONS 

Record code for the filesystem options table.

HEADER_SEARCH_OPTIONS 

Record code for the headers search options table.

PREPROCESSOR_OPTIONS 

Record code for the preprocessor options table.

MODULE_NAME 

Record code for the module name.

MODULE_MAP_FILE 

Record code for the module map file that was used to build this AST file.

SIGNATURE 

Record code for the signature that identifiers this AST file.

Definition at line 238 of file ASTBitCodes.h.

Enumerator:
UPD_CXX_ADDED_IMPLICIT_MEMBER 
UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION 
UPD_CXX_ADDED_ANONYMOUS_NAMESPACE 
UPD_CXX_ADDED_FUNCTION_DEFINITION 
UPD_CXX_INSTANTIATED_STATIC_DATA_MEMBER 
UPD_CXX_INSTANTIATED_CLASS_DEFINITION 
UPD_CXX_RESOLVED_EXCEPTION_SPEC 
UPD_CXX_DEDUCED_RETURN_TYPE 
UPD_DECL_MARKED_USED 
UPD_MANGLING_NUMBER 
UPD_STATIC_LOCAL_NUMBER 
UPD_DECL_MARKED_OPENMP_THREADPRIVATE 

Definition at line 24 of file ASTCommon.h.

Record types that occur within the input-files block inside the control block.

Enumerator:
INPUT_FILE 

An input file.

Definition at line 299 of file ASTBitCodes.h.

Specifies the kind of module that has been loaded.

Enumerator:
MK_ImplicitModule 

File is an implicitly-loaded module.

MK_ExplicitModule 

File is an explicitly-loaded module.

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 44 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 598 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].

PP_MACRO_DIRECTIVE_HISTORY 

The macro directives history for a particular identifier.

Definition at line 576 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 558 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_TOPHEADER 

Specifies a top-level 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.

SUBMODULE_EXCLUDED_HEADER 

Specifies a header that has been explicitly excluded from this submodule.

SUBMODULE_LINK_LIBRARY 

Specifies a library or framework to link against.

SUBMODULE_CONFIG_MACRO 

Specifies a configuration macro for this module.

SUBMODULE_CONFLICT 

Specifies a conflict with another module.

SUBMODULE_PRIVATE_HEADER 

Specifies a header that is private to this submodule.

SUBMODULE_TEXTUAL_HEADER 

Specifies a header that is part of the module but must be textually included.

SUBMODULE_PRIVATE_TEXTUAL_HEADER 

Specifies a header that is private to this submodule but must be textually included.

Definition at line 611 of file ASTBitCodes.h.


Function Documentation

Retrieve the "definitive" declaration that provides all of the visible entries for the given declaration context, if there is one.

The "definitive" declaration is the only place where we need to look to find information about the declarations within the given declaration context. For example, C++ and Objective-C classes, C structs/unions, and Objective-C protocols, categories, and extensions are all defined in a single place in the source code, so they have definitive declarations associated with them. C++ namespaces, on the other hand, can have multiple definitions.

Definition at line 93 of file ASTCommon.cpp.

References clang::DeclContext::getDeclKind(), clang::ObjCProtocolDecl::getDefinition(), clang::TagDecl::getDefinition(), and Record.

Referenced by clang::ASTWriter::AddedVisibleDecl(), and getDefinitiveModuleFileFor().

Determine whether the given declaration kind is redeclarable.

Definition at line 150 of file ASTCommon.cpp.

References Record.

Referenced by clang::ASTDeclWriter::VisitRedeclarable().

template<typename IdxForTypeTy >
TypeID clang::serialization::MakeTypeID ( ASTContext &  Context,
QualType  T,
IdxForTypeTy  IdxForType 
)

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 195 of file ASTBitCodes.h.

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

The number of predefined selector IDs.

Definition at line 147 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 161 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.

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

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.