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

Namespaces

namespace  reader
 

Classes

class  AbstractTypeReader
 
class  AbstractTypeWriter
 
class  BasicReaderBase
 
class  DataStreamBasicReader
 DataStreamBasicReader provides convenience implementations for many BasicReader methods based on the assumption that the ultimate reader implementation is based on a variable-length stream of unstructured data (like Clang's module files). More...
 
class  DataStreamBasicWriter
 DataStreamBasicWriter provides convenience implementations for many BasicWriter methods based on the assumption that the ultimate writer implementation is based on a variable-length stream of unstructured data (like Clang's module files). More...
 
class  DeclarationNameKey
 A key used when looking up entities by DeclarationName. More...
 
class  DeclOffset
 Source location and bit offset of a declaration. 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...
 
struct  InputFileInfo
 The input file info that has been loaded from an AST file. 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  MultiOnDiskHashTable
 A collection of on-disk hash tables, merged when relevant for performance. More...
 
class  MultiOnDiskHashTableGenerator
 Writer for the on-disk hash table. More...
 
struct  ObjCCategoriesInfo
 Describes the categories of an Objective-C class. More...
 
class  PPEntityOffset
 Source range/offset of a preprocessed entity. More...
 
class  PPSkippedRange
 Source range of a skipped preprocessor region. More...
 
class  ReadMethodPoolVisitor
 
class  TypeIdx
 A type index; the type ID with the qualifier bits removed. More...
 
class  UnalignedUInt64
 32 aligned uint64_t in the AST file. More...
 
struct  UnsafeQualTypeDenseMapInfo
 A structure for putting "fast"-unqualified QualTypes into a DenseMap. More...
 

Typedefs

using IdentifierID = uint64_t
 An ID number that refers to an identifier in an AST file.
 
using DeclID = DeclIDBase::DeclID
 An ID number that refers to a declaration in an AST file.
 
using TypeID = uint64_t
 An ID number that refers to a type in an AST file.
 
using LocalTypeID = TypeID
 Same with TypeID except that the LocalTypeID is only meaningful with the corresponding ModuleFile.
 
using MacroID = uint32_t
 An ID number that refers to a macro in an AST file.
 
using GlobalMacroID = uint32_t
 A global ID number that refers to a macro in an AST file.
 
using LocalMacroID = uint32_t
 A local to a module ID number that refers to a macro in an AST file.
 
using SelectorID = uint32_t
 An ID number that refers to an ObjC selector in an AST file.
 
using CXXBaseSpecifiersID = uint32_t
 An ID number that refers to a set of CXXBaseSpecifiers in an AST file.
 
using CXXCtorInitializersID = uint32_t
 An ID number that refers to a list of CXXCtorInitializers in an AST file.
 
using PreprocessedEntityID = uint32_t
 An ID number that refers to an entity in the detailed preprocessing record.
 
using SubmoduleID = uint32_t
 An ID number that refers to a submodule in a module file.
 
using unaligned_decl_id_t = llvm::support::detail::packed_endian_specific_integral< serialization::DeclID, llvm::endianness::native, llvm::support::unaligned >
 

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 , OPTIONS_BLOCK_ID , EXTENSION_BLOCK_ID , UNHASHED_CONTROL_BLOCK_ID
}
 Describes the various kinds of blocks that occur within an AST file. More...
 
enum  ControlRecordTypes {
  METADATA = 1 , IMPORTS , ORIGINAL_FILE , ORIGINAL_FILE_ID ,
  INPUT_FILE_OFFSETS , MODULE_NAME , MODULE_MAP_FILE , MODULE_DIRECTORY
}
 Record types that occur within the control block. More...
 
enum  OptionsRecordTypes {
  LANGUAGE_OPTIONS = 1 , TARGET_OPTIONS , FILE_SYSTEM_OPTIONS , HEADER_SEARCH_OPTIONS ,
  PREPROCESSOR_OPTIONS
}
 Record types that occur within the options block inside the control block. More...
 
enum  UnhashedControlBlockRecordTypes {
  SIGNATURE = 1 , AST_BLOCK_HASH , DIAGNOSTIC_OPTIONS , HEADER_SEARCH_PATHS ,
  DIAG_PRAGMA_MAPPINGS , HEADER_SEARCH_ENTRY_USAGE , VFS_USAGE
}
 Record codes for the unhashed control block. More...
 
enum  ExtensionBlockRecordTypes { EXTENSION_METADATA = 1 , FIRST_EXTENSION_RECORD_ID = 4 }
 Record code for extension blocks. More...
 
enum  InputFileRecordTypes { INPUT_FILE = 1 , INPUT_FILE_HASH }
 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 , SELECTOR_OFFSETS = 11 , METHOD_POOL = 12 , PP_COUNTER_VALUE = 13 ,
  SOURCE_LOCATION_OFFSETS = 14 , EXT_VECTOR_DECLS = 16 , UNUSED_FILESCOPED_DECLS = 17 , PPD_ENTITIES_OFFSETS = 18 ,
  VTABLE_USES = 19 , REFERENCED_SELECTOR_POOL = 21 , TU_UPDATE_LEXICAL = 22 , SEMA_DECL_REFS = 24 ,
  WEAK_UNDECLARED_IDENTIFIERS = 25 , PENDING_IMPLICIT_INSTANTIATIONS = 26 , UPDATE_VISIBLE = 28 , DECL_UPDATE_OFFSETS = 29 ,
  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 , OBJC_CATEGORIES = 46 ,
  MACRO_OFFSET = 47 , INTERESTING_IDENTIFIERS = 48 , UNDEFINED_BUT_USED = 49 , LATE_PARSED_TEMPLATE = 50 ,
  OPTIMIZE_PRAGMA_OPTIONS = 51 , UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES = 52 , DELETE_EXPRS_TO_ANALYZE = 54 , MSSTRUCT_PRAGMA_OPTIONS = 55 ,
  POINTERS_TO_MEMBERS_PRAGMA_OPTIONS = 56 , CUDA_PRAGMA_FORCE_HOST_DEVICE_DEPTH = 57 , OPENCL_EXTENSION_TYPES = 58 , OPENCL_EXTENSION_DECLS = 59 ,
  MODULAR_CODEGEN_DECLS = 60 , ALIGN_PACK_PRAGMA_OPTIONS = 61 , PP_CONDITIONAL_STACK = 62 , PPD_SKIPPED_RANGES = 63 ,
  DECLS_TO_CHECK_FOR_DEFERRED_DIAGS = 64 , FLOAT_CONTROL_PRAGMA_OPTIONS = 65 , PP_ASSUME_NONNULL_LOC = 67 , DELAYED_NAMESPACE_LEXICAL_VISIBLE_RECORD = 68 ,
  PP_UNSAFE_BUFFER_USAGE = 69 , VTABLES_TO_EMIT = 70
}
 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_BUFFER_BLOB_COMPRESSED = 4 ,
  SM_SLOC_EXPANSION_ENTRY = 5
}
 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 ,
  PP_MODULE_MACRO = 5
}
 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 ,
  SUBMODULE_INITIALIZERS = 16 , SUBMODULE_EXPORT_AS = 17 , SUBMODULE_AFFECTING_MODULES = 18
}
 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_BUILTIN_FN = 36 , PREDEF_TYPE_EVENT_ID = 37 , PREDEF_TYPE_CLK_EVENT_ID = 38 , PREDEF_TYPE_SAMPLER_ID = 39 ,
  PREDEF_TYPE_QUEUE_ID = 40 , PREDEF_TYPE_RESERVE_ID_ID = 41 , PREDEF_TYPE_ARRAY_SECTION = 42 , PREDEF_TYPE_FLOAT128_ID = 43 ,
  PREDEF_TYPE_FLOAT16_ID = 44 , PREDEF_TYPE_CHAR8_ID = 45 , PREDEF_TYPE_SHORT_ACCUM_ID = 46 , PREDEF_TYPE_ACCUM_ID = 47 ,
  PREDEF_TYPE_LONG_ACCUM_ID = 48 , PREDEF_TYPE_USHORT_ACCUM_ID = 49 , PREDEF_TYPE_UACCUM_ID = 50 , PREDEF_TYPE_ULONG_ACCUM_ID = 51 ,
  PREDEF_TYPE_SHORT_FRACT_ID = 52 , PREDEF_TYPE_FRACT_ID = 53 , PREDEF_TYPE_LONG_FRACT_ID = 54 , PREDEF_TYPE_USHORT_FRACT_ID = 55 ,
  PREDEF_TYPE_UFRACT_ID = 56 , PREDEF_TYPE_ULONG_FRACT_ID = 57 , PREDEF_TYPE_SAT_SHORT_ACCUM_ID = 58 , PREDEF_TYPE_SAT_ACCUM_ID = 59 ,
  PREDEF_TYPE_SAT_LONG_ACCUM_ID = 60 , PREDEF_TYPE_SAT_USHORT_ACCUM_ID = 61 , PREDEF_TYPE_SAT_UACCUM_ID = 62 , PREDEF_TYPE_SAT_ULONG_ACCUM_ID = 63 ,
  PREDEF_TYPE_SAT_SHORT_FRACT_ID = 64 , PREDEF_TYPE_SAT_FRACT_ID = 65 , PREDEF_TYPE_SAT_LONG_FRACT_ID = 66 , PREDEF_TYPE_SAT_USHORT_FRACT_ID = 67 ,
  PREDEF_TYPE_SAT_UFRACT_ID = 68 , PREDEF_TYPE_SAT_ULONG_FRACT_ID = 69 , PREDEF_TYPE_OMP_ARRAY_SHAPING = 70 , PREDEF_TYPE_OMP_ITERATOR = 71 ,
  PREDEF_TYPE_INCOMPLETE_MATRIX_IDX = 72 , PREDEF_TYPE_BFLOAT16_ID = 73 , PREDEF_TYPE_IBM128_ID = 74 , PREDEF_TYPE_UNRESOLVED_TEMPLATE ,
  PREDEF_TYPE_LAST_ID
}
 Predefined type IDs. More...
 
enum  TypeCode { TYPE_EXT_QUAL = 1 }
 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  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_MS_GUID ,
  DECL_TEMPLATE_PARAM_OBJECT , DECL_VAR , DECL_IMPLICIT_PARAM , DECL_PARM_VAR ,
  DECL_DECOMPOSITION , DECL_BINDING , DECL_FILE_SCOPE_ASM , DECL_TOP_LEVEL_STMT_DECL ,
  DECL_BLOCK , DECL_CAPTURED , DECL_CONTEXT_LEXICAL , DECL_CONTEXT_VISIBLE ,
  DECL_LABEL , DECL_NAMESPACE , DECL_NAMESPACE_ALIAS , DECL_USING ,
  DECL_USING_ENUM , DECL_USING_PACK , DECL_USING_SHADOW , DECL_CONSTRUCTOR_USING_SHADOW ,
  DECL_USING_DIRECTIVE , DECL_UNRESOLVED_USING_VALUE , DECL_UNRESOLVED_USING_TYPENAME , DECL_LINKAGE_SPEC ,
  DECL_EXPORT , DECL_CXX_RECORD , DECL_CXX_DEDUCTION_GUIDE , 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_CONCEPT , DECL_UNRESOLVED_USING_IF_EXISTS , DECL_STATIC_ASSERT ,
  DECL_CXX_BASE_SPECIFIERS , DECL_CXX_CTOR_INITIALIZERS , DECL_INDIRECTFIELD , DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK ,
  DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK , DECL_IMPORT , DECL_OMP_THREADPRIVATE , DECL_OMP_REQUIRES ,
  DECL_OMP_ALLOCATE , DECL_EMPTY , DECL_LIFETIME_EXTENDED_TEMPORARY , DECL_REQUIRES_EXPR_BODY ,
  DECL_OBJC_TYPE_PARAM , DECL_OMP_CAPTUREDEXPR , DECL_PRAGMA_COMMENT , DECL_PRAGMA_DETECT_MISMATCH ,
  DECL_OMP_DECLARE_MAPPER , DECL_OMP_DECLARE_REDUCTION , DECL_UNNAMED_GLOBAL_CONSTANT , DECL_HLSL_BUFFER ,
  DECL_IMPLICIT_CONCEPT_SPECIALIZATION , DECL_LAST = DECL_IMPLICIT_CONCEPT_SPECIALIZATION
}
 Record codes for each kind of declaration. More...
 
enum  StmtCode {
  STMT_STOP = DECL_LAST + 1 , 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_CONSTANT ,
  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_MATRIX_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_DESIGNATED_INIT_UPDATE , EXPR_NO_INIT , EXPR_ARRAY_INIT_LOOP ,
  EXPR_ARRAY_INIT_INDEX , EXPR_IMPLICIT_VALUE_INIT , EXPR_VA_ARG , EXPR_ADDR_LABEL ,
  EXPR_STMT , EXPR_CHOOSE , EXPR_GNU_NULL , EXPR_SOURCE_LOC ,
  EXPR_BUILTIN_PP_EMBED , EXPR_SHUFFLE_VECTOR , EXPR_CONVERT_VECTOR , EXPR_BLOCK ,
  EXPR_GENERIC_SELECTION , EXPR_PSEUDO_OBJECT , EXPR_ATOMIC , EXPR_RECOVERY ,
  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 , EXPR_OBJC_AVAILABILITY_CHECK , STMT_CXX_CATCH ,
  STMT_CXX_TRY , STMT_CXX_FOR_RANGE , EXPR_CXX_OPERATOR_CALL , EXPR_CXX_MEMBER_CALL ,
  EXPR_CXX_REWRITTEN_BINARY_OPERATOR , EXPR_CXX_CONSTRUCT , EXPR_CXX_INHERITED_CTOR_INIT , EXPR_CXX_TEMPORARY_OBJECT ,
  EXPR_CXX_STATIC_CAST , EXPR_CXX_DYNAMIC_CAST , EXPR_CXX_REINTERPRET_CAST , EXPR_CXX_CONST_CAST ,
  EXPR_CXX_ADDRSPACE_CAST , EXPR_CXX_FUNCTIONAL_CAST , EXPR_BUILTIN_BIT_CAST , EXPR_USER_DEFINED_LITERAL ,
  EXPR_CXX_STD_INITIALIZER_LIST , EXPR_CXX_BOOL_LITERAL , EXPR_CXX_PAREN_LIST_INIT , 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_PACK_INDEXING , 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_CONCEPT_SPECIALIZATION ,
  EXPR_REQUIRES , EXPR_CUDA_KERNEL_CALL , EXPR_ASTYPE , EXPR_CXX_PROPERTY_REF_EXPR ,
  EXPR_CXX_PROPERTY_SUBSCRIPT_EXPR , EXPR_CXX_UUIDOF_EXPR , EXPR_CXX_UUIDOF_TYPE , STMT_SEH_LEAVE ,
  STMT_SEH_EXCEPT , STMT_SEH_FINALLY , STMT_SEH_TRY , STMT_OMP_META_DIRECTIVE ,
  STMT_OMP_CANONICAL_LOOP , STMT_OMP_PARALLEL_DIRECTIVE , STMT_OMP_SIMD_DIRECTIVE , STMT_OMP_TILE_DIRECTIVE ,
  STMT_OMP_UNROLL_DIRECTIVE , STMT_OMP_REVERSE_DIRECTIVE , STMT_OMP_INTERCHANGE_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_MASTER_DIRECTIVE , STMT_OMP_PARALLEL_MASKED_DIRECTIVE , STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE , STMT_OMP_TASK_DIRECTIVE ,
  STMT_OMP_TASKYIELD_DIRECTIVE , STMT_OMP_ERROR_DIRECTIVE , STMT_OMP_BARRIER_DIRECTIVE , STMT_OMP_TASKWAIT_DIRECTIVE ,
  STMT_OMP_FLUSH_DIRECTIVE , STMT_OMP_DEPOBJ_DIRECTIVE , STMT_OMP_SCAN_DIRECTIVE , STMT_OMP_ORDERED_DIRECTIVE ,
  STMT_OMP_ATOMIC_DIRECTIVE , STMT_OMP_TARGET_DIRECTIVE , STMT_OMP_TARGET_DATA_DIRECTIVE , STMT_OMP_TARGET_ENTER_DATA_DIRECTIVE ,
  STMT_OMP_TARGET_EXIT_DATA_DIRECTIVE , STMT_OMP_TARGET_PARALLEL_DIRECTIVE , STMT_OMP_TARGET_PARALLEL_FOR_DIRECTIVE , STMT_OMP_TEAMS_DIRECTIVE ,
  STMT_OMP_TASKGROUP_DIRECTIVE , STMT_OMP_CANCELLATION_POINT_DIRECTIVE , STMT_OMP_CANCEL_DIRECTIVE , STMT_OMP_TASKLOOP_DIRECTIVE ,
  STMT_OMP_TASKLOOP_SIMD_DIRECTIVE , STMT_OMP_MASTER_TASKLOOP_DIRECTIVE , STMT_OMP_MASTER_TASKLOOP_SIMD_DIRECTIVE , STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE ,
  STMT_OMP_PARALLEL_MASTER_TASKLOOP_SIMD_DIRECTIVE , STMT_OMP_MASKED_TASKLOOP_DIRECTIVE , STMT_OMP_MASKED_TASKLOOP_SIMD_DIRECTIVE , STMT_OMP_PARALLEL_MASKED_TASKLOOP_DIRECTIVE ,
  STMT_OMP_PARALLEL_MASKED_TASKLOOP_SIMD_DIRECTIVE , STMT_OMP_DISTRIBUTE_DIRECTIVE , STMT_OMP_TARGET_UPDATE_DIRECTIVE , STMT_OMP_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE ,
  STMT_OMP_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE , STMT_OMP_DISTRIBUTE_SIMD_DIRECTIVE , STMT_OMP_TARGET_PARALLEL_FOR_SIMD_DIRECTIVE , STMT_OMP_TARGET_SIMD_DIRECTIVE ,
  STMT_OMP_TEAMS_DISTRIBUTE_DIRECTIVE , STMT_OMP_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE , STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE , STMT_OMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE ,
  STMT_OMP_TARGET_TEAMS_DIRECTIVE , STMT_OMP_TARGET_TEAMS_DISTRIBUTE_DIRECTIVE , STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE , STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE ,
  STMT_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE , STMT_OMP_SCOPE_DIRECTIVE , STMT_OMP_INTEROP_DIRECTIVE , STMT_OMP_DISPATCH_DIRECTIVE ,
  STMT_OMP_MASKED_DIRECTIVE , STMT_OMP_GENERIC_LOOP_DIRECTIVE , STMT_OMP_TEAMS_GENERIC_LOOP_DIRECTIVE , STMT_OMP_TARGET_TEAMS_GENERIC_LOOP_DIRECTIVE ,
  STMT_OMP_PARALLEL_GENERIC_LOOP_DIRECTIVE , STMT_OMP_TARGET_PARALLEL_GENERIC_LOOP_DIRECTIVE , STMT_OMP_ASSUME_DIRECTIVE , EXPR_ARRAY_SECTION ,
  EXPR_OMP_ARRAY_SHAPING , EXPR_OMP_ITERATOR , EXPR_OBJC_BRIDGED_CAST , STMT_MS_DEPENDENT_EXISTS ,
  EXPR_LAMBDA , STMT_COROUTINE_BODY , STMT_CORETURN , EXPR_COAWAIT ,
  EXPR_COYIELD , EXPR_DEPENDENT_COAWAIT , EXPR_FIXEDPOINT_LITERAL , EXPR_SYCL_UNIQUE_STABLE_NAME ,
  STMT_OPENACC_COMPUTE_CONSTRUCT , STMT_OPENACC_LOOP_CONSTRUCT
}
 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  CleanupObjectKind { COK_Block , COK_CompoundLiteral }
 Kinds of cleanup objects owned by ExprWithCleanups. More...
 
enum  ModuleKind {
  MK_ImplicitModule , MK_ExplicitModule , MK_PCH , MK_Preamble ,
  MK_MainFile , MK_PrebuiltModule
}
 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_ADDED_VAR_DEFINITION , UPD_CXX_POINT_OF_INSTANTIATION , UPD_CXX_INSTANTIATED_CLASS_DEFINITION , UPD_CXX_INSTANTIATED_DEFAULT_ARGUMENT ,
  UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER , UPD_CXX_RESOLVED_DTOR_DELETE , 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 ,
  UPD_DECL_MARKED_OPENMP_ALLOCATE , UPD_DECL_MARKED_OPENMP_DECLARETARGET , UPD_DECL_EXPORTED , UPD_ADDED_ATTR_TO_RECORD
}
 

Functions

template<class T >
T makeNullableFromOptional (const std::optional< T > &value)
 
template<class T >
TmakePointerFromOptional (std::optional< T * > value)
 
template<class T >
std::optional< TmakeOptionalFromNullable (const T &value)
 
template<class T >
std::optional< T * > makeOptionalFromPointer (T *value)
 
TypeIdx TypeIdxFromBuiltin (const BuiltinType *BT)
 
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.
 
template<typename Fn >
void numberAnonymousDeclsWithin (const DeclContext *DC, Fn Visit)
 Visit each declaration within DC that needs an anonymous declaration number and call Visit with the declaration and its number.
 
bool isPartOfPerModuleInitializer (const Decl *D)
 Determine whether the given declaration will be included in the per-module initializer if it needs to be eagerly handed to the AST consumer.
 

Variables

const unsigned VERSION_MAJOR = 31
 AST file major version number supported by this version of Clang.
 
const unsigned VERSION_MINOR = 1
 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 = 505
 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 DECL_UPDATES = 49
 Record of updates for a declaration that was modified after being deserialized.
 
const unsigned int LOCAL_REDECLARATIONS = 50
 Record code for a list of local redeclarations of a declaration.
 

Typedef Documentation

◆ CXXBaseSpecifiersID

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

Definition at line 174 of file ASTBitCodes.h.

◆ CXXCtorInitializersID

An ID number that refers to a list of CXXCtorInitializers in an AST file.

Definition at line 178 of file ASTBitCodes.h.

◆ DeclID

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

See the comments in DeclIDBase for details.

Definition at line 70 of file ASTBitCodes.h.

◆ GlobalMacroID

using clang::serialization::GlobalMacroID = typedef uint32_t

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

Definition at line 157 of file ASTBitCodes.h.

◆ IdentifierID

using clang::serialization::IdentifierID = typedef uint64_t

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

◆ LocalMacroID

using clang::serialization::LocalMacroID = typedef uint32_t

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

Definition at line 161 of file ASTBitCodes.h.

◆ LocalTypeID

Same with TypeID except that the LocalTypeID is only meaningful with the corresponding ModuleFile.

FIXME: Make TypeID and LocalTypeID a class to improve the type safety.

Definition at line 94 of file ASTBitCodes.h.

◆ MacroID

using clang::serialization::MacroID = typedef uint32_t

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

Definition at line 154 of file ASTBitCodes.h.

◆ PreprocessedEntityID

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

Definition at line 182 of file ASTBitCodes.h.

◆ SelectorID

using clang::serialization::SelectorID = typedef uint32_t

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

Definition at line 167 of file ASTBitCodes.h.

◆ SubmoduleID

using clang::serialization::SubmoduleID = typedef uint32_t

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

Definition at line 185 of file ASTBitCodes.h.

◆ TypeID

using clang::serialization::TypeID = typedef uint64_t

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

The ID of a type is partitioned into three parts:

  • the lower three bits are used to store the const/volatile/restrict qualifiers (as with QualType).
  • the next 29 bits provide a type index in the corresponding module file.
  • the upper 32 bits provide a module file 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". The module file index for predefined types are always 0 since they don't belong to any modules. Values from NUM_PREDEF_TYPE_IDs are other types that have serialized representations.

Definition at line 88 of file ASTBitCodes.h.

◆ unaligned_decl_id_t

using clang::serialization::unaligned_decl_id_t = typedef llvm::support::detail::packed_endian_specific_integral< serialization::DeclID, llvm::endianness::native, llvm::support::unaligned>

Definition at line 283 of file ASTBitCodes.h.

Enumeration Type Documentation

◆ ASTRecordTypes

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.

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.

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.

REFERENCED_SELECTOR_POOL 

Record code for referenced selector pool.

TU_UPDATE_LEXICAL 

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

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.

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.

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.

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.

INTERESTING_IDENTIFIERS 

A list of "interesting" identifiers.

Only used in C++ (where we don't normally do lookups into the serialized identifier table). These are eagerly deserialized.

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.

DELETE_EXPRS_TO_ANALYZE 

Delete expressions that will be analyzed later.

MSSTRUCT_PRAGMA_OPTIONS 

Record code for #pragma ms_struct options.

POINTERS_TO_MEMBERS_PRAGMA_OPTIONS 

Record code for #pragma ms_struct options.

CUDA_PRAGMA_FORCE_HOST_DEVICE_DEPTH 

Number of unmatched #pragma clang cuda_force_host_device begin directives we've seen.

OPENCL_EXTENSION_TYPES 

Record code for types associated with OpenCL extensions.

OPENCL_EXTENSION_DECLS 

Record code for declarations associated with OpenCL extensions.

MODULAR_CODEGEN_DECLS 
ALIGN_PACK_PRAGMA_OPTIONS 

Record code for #pragma align/pack options.

PP_CONDITIONAL_STACK 

The stack of open #ifs/#ifdefs recorded in a preamble.

PPD_SKIPPED_RANGES 

A table of skipped ranges within the preprocessing record.

DECLS_TO_CHECK_FOR_DEFERRED_DIAGS 

Record code for the Decls to be checked for deferred diags.

FLOAT_CONTROL_PRAGMA_OPTIONS 

Record code for #pragma float_control options.

PP_ASSUME_NONNULL_LOC 

ID 66 used to be the list of included files.

Record code for an unterminated #pragma clang assume_nonnull begin recorded in a preamble.

DELAYED_NAMESPACE_LEXICAL_VISIBLE_RECORD 

Record code for lexical and visible block for delayed namespace in reduced BMI.

PP_UNSAFE_BUFFER_USAGE 

Record code for #pragma clang unsafe_buffer_usage begin/end.

VTABLES_TO_EMIT 

Record code for vtables to emit.

Definition at line 449 of file ASTBitCodes.h.

◆ BlockIDs

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.

OPTIONS_BLOCK_ID 

The block of configuration options, used to check that a module is being used in a configuration compatible with the configuration in which it was built.

This block is part of the control block.

EXTENSION_BLOCK_ID 

A block containing a module file extension.

UNHASHED_CONTROL_BLOCK_ID 

A block with unhashed content.

These records should not change the ASTFileSignature. See UnhashedControlBlockRecordTypes for the list of records.

Definition at line 293 of file ASTBitCodes.h.

◆ CommentRecordTypes

Record types used within a comments block.

Enumerator
COMMENTS_RAW_COMMENT 

Definition at line 863 of file ASTBitCodes.h.

◆ ControlRecordTypes

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.

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

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.

MODULE_DIRECTORY 

Record code for the module build directory.

Definition at line 348 of file ASTBitCodes.h.

◆ DeclUpdateKind

Enumerator
UPD_CXX_ADDED_IMPLICIT_MEMBER 
UPD_CXX_ADDED_TEMPLATE_SPECIALIZATION 
UPD_CXX_ADDED_ANONYMOUS_NAMESPACE 
UPD_CXX_ADDED_FUNCTION_DEFINITION 
UPD_CXX_ADDED_VAR_DEFINITION 
UPD_CXX_POINT_OF_INSTANTIATION 
UPD_CXX_INSTANTIATED_CLASS_DEFINITION 
UPD_CXX_INSTANTIATED_DEFAULT_ARGUMENT 
UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER 
UPD_CXX_RESOLVED_DTOR_DELETE 
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 
UPD_DECL_MARKED_OPENMP_ALLOCATE 
UPD_DECL_MARKED_OPENMP_DECLARETARGET 
UPD_DECL_EXPORTED 
UPD_ADDED_ATTR_TO_RECORD 

Definition at line 24 of file ASTCommon.h.

◆ ExtensionBlockRecordTypes

Record code for extension blocks.

Enumerator
EXTENSION_METADATA 

Metadata describing this particular extension.

FIRST_EXTENSION_RECORD_ID 

The first record ID allocated to the extensions themselves.

Definition at line 430 of file ASTBitCodes.h.

◆ InputFileRecordTypes

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

Enumerator
INPUT_FILE 

An input file.

INPUT_FILE_HASH 

The input file content hash.

Definition at line 440 of file ASTBitCodes.h.

◆ ModuleKind

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.

MK_PrebuiltModule 

File is from a prebuilt module path.

Definition at line 42 of file ModuleFile.h.

◆ OptionsRecordTypes

Record types that occur within the options block inside the control block.

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

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.

Definition at line 383 of file ASTBitCodes.h.

◆ PreprocessorDetailRecordTypes

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

◆ PreprocessorRecordTypes

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.

PP_MODULE_MACRO 

A macro directive exported by a module.

[PP_MODULE_MACRO, SubmoduleID, MacroID, (Overridden SubmoduleID)*]

Definition at line 755 of file ASTBitCodes.h.

◆ SourceManagerRecordTypes

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_BUFFER_BLOB_COMPRESSED 

Describes a zlib-compressed blob that contains the data for a buffer entry.

SM_SLOC_EXPANSION_ENTRY 

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

Definition at line 730 of file ASTBitCodes.h.

◆ SubmoduleRecordTypes

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.

SUBMODULE_INITIALIZERS 

Specifies some declarations with initializers that must be emitted to initialize the module.

SUBMODULE_EXPORT_AS 

Specifies the name of the module that will eventually re-export the entities in this module.

SUBMODULE_AFFECTING_MODULES 

Specifies affecting modules that were not imported.

Definition at line 794 of file ASTBitCodes.h.

◆ UnhashedControlBlockRecordTypes

Record codes for the unhashed control block.

Enumerator
SIGNATURE 

Record code for the signature that identifiers this AST file.

AST_BLOCK_HASH 

Record code for the content hash of the AST block.

DIAGNOSTIC_OPTIONS 

Record code for the diagnostic options table.

HEADER_SEARCH_PATHS 

Record code for the headers search paths.

DIAG_PRAGMA_MAPPINGS 

Record code for #pragma diagnostic mappings.

HEADER_SEARCH_ENTRY_USAGE 

Record code for the indices of used header search entries.

VFS_USAGE 

Record code for the indices of used VFSs.

Definition at line 406 of file ASTBitCodes.h.

Function Documentation

◆ ComputeHash()

unsigned clang::serialization::ComputeHash ( Selector  Sel)

◆ getDefinitiveDeclContext()

const DeclContext * clang::serialization::getDefinitiveDeclContext ( const DeclContext DC)

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 306 of file ASTCommon.cpp.

References clang::DeclContext::getDeclKind(), and getDefinition().

◆ isPartOfPerModuleInitializer()

bool clang::serialization::isPartOfPerModuleInitializer ( const Decl D)
inline

Determine whether the given declaration will be included in the per-module initializer if it needs to be eagerly handed to the AST consumer.

If so, we should not hand it to the consumer when deserializing it, nor include it in the list of eagerly deserialized declarations.

Definition at line 92 of file ASTCommon.h.

References D, and clang::isTemplateInstantiation().

Referenced by isRequiredDecl().

◆ isRedeclarableDeclKind()

bool clang::serialization::isRedeclarableDeclKind ( unsigned  Kind)

Determine whether the given declaration kind is redeclarable.

Definition at line 365 of file ASTCommon.cpp.

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

◆ makeNullableFromOptional()

template<class T >
T clang::serialization::makeNullableFromOptional ( const std::optional< T > &  value)
inline

Definition at line 19 of file AbstractBasicReader.h.

References clang::T.

◆ makeOptionalFromNullable()

template<class T >
std::optional< T > clang::serialization::makeOptionalFromNullable ( const T value)
inline

Definition at line 20 of file AbstractBasicWriter.h.

◆ makeOptionalFromPointer()

template<class T >
std::optional< T * > clang::serialization::makeOptionalFromPointer ( T value)
inline

Definition at line 24 of file AbstractBasicWriter.h.

◆ makePointerFromOptional()

template<class T >
T * clang::serialization::makePointerFromOptional ( std::optional< T * >  value)
inline

Definition at line 23 of file AbstractBasicReader.h.

◆ needsAnonymousDeclarationNumber()

bool clang::serialization::needsAnonymousDeclarationNumber ( const NamedDecl D)

◆ numberAnonymousDeclsWithin()

template<typename Fn >
void clang::serialization::numberAnonymousDeclsWithin ( const DeclContext DC,
Fn  Visit 
)

Visit each declaration within DC that needs an anonymous declaration number and call Visit with the declaration and its number.

Definition at line 72 of file ASTCommon.h.

References clang::DeclContext::decls(), and needsAnonymousDeclarationNumber().

Referenced by clang::ASTWriter::getAnonymousDeclarationNumber().

◆ TypeIdxFromBuiltin()

serialization::TypeIdx clang::serialization::TypeIdxFromBuiltin ( const BuiltinType BT)

Definition at line 26 of file ASTCommon.cpp.

References clang::BuiltinType::getKind(), PREDEF_TYPE_ACCUM_ID, PREDEF_TYPE_ARC_UNBRIDGED_CAST, PREDEF_TYPE_ARRAY_SECTION, PREDEF_TYPE_BFLOAT16_ID, PREDEF_TYPE_BOOL_ID, PREDEF_TYPE_BOUND_MEMBER, PREDEF_TYPE_BUILTIN_FN, PREDEF_TYPE_CHAR16_ID, PREDEF_TYPE_CHAR32_ID, PREDEF_TYPE_CHAR8_ID, PREDEF_TYPE_CHAR_S_ID, PREDEF_TYPE_CHAR_U_ID, PREDEF_TYPE_CLK_EVENT_ID, PREDEF_TYPE_DEPENDENT_ID, PREDEF_TYPE_DOUBLE_ID, PREDEF_TYPE_EVENT_ID, PREDEF_TYPE_FLOAT128_ID, PREDEF_TYPE_FLOAT16_ID, PREDEF_TYPE_FLOAT_ID, PREDEF_TYPE_FRACT_ID, PREDEF_TYPE_HALF_ID, PREDEF_TYPE_IBM128_ID, PREDEF_TYPE_INCOMPLETE_MATRIX_IDX, PREDEF_TYPE_INT128_ID, PREDEF_TYPE_INT_ID, PREDEF_TYPE_LONG_ACCUM_ID, PREDEF_TYPE_LONG_FRACT_ID, PREDEF_TYPE_LONG_ID, PREDEF_TYPE_LONGDOUBLE_ID, PREDEF_TYPE_LONGLONG_ID, PREDEF_TYPE_NULLPTR_ID, PREDEF_TYPE_OBJC_CLASS, PREDEF_TYPE_OBJC_ID, PREDEF_TYPE_OBJC_SEL, PREDEF_TYPE_OMP_ARRAY_SHAPING, PREDEF_TYPE_OMP_ITERATOR, PREDEF_TYPE_OVERLOAD_ID, PREDEF_TYPE_PSEUDO_OBJECT, PREDEF_TYPE_QUEUE_ID, PREDEF_TYPE_RESERVE_ID_ID, PREDEF_TYPE_SAMPLER_ID, PREDEF_TYPE_SAT_ACCUM_ID, PREDEF_TYPE_SAT_FRACT_ID, PREDEF_TYPE_SAT_LONG_ACCUM_ID, PREDEF_TYPE_SAT_LONG_FRACT_ID, PREDEF_TYPE_SAT_SHORT_ACCUM_ID, PREDEF_TYPE_SAT_SHORT_FRACT_ID, PREDEF_TYPE_SAT_UACCUM_ID, PREDEF_TYPE_SAT_UFRACT_ID, PREDEF_TYPE_SAT_ULONG_ACCUM_ID, PREDEF_TYPE_SAT_ULONG_FRACT_ID, PREDEF_TYPE_SAT_USHORT_ACCUM_ID, PREDEF_TYPE_SAT_USHORT_FRACT_ID, PREDEF_TYPE_SCHAR_ID, PREDEF_TYPE_SHORT_ACCUM_ID, PREDEF_TYPE_SHORT_FRACT_ID, PREDEF_TYPE_SHORT_ID, PREDEF_TYPE_UACCUM_ID, PREDEF_TYPE_UCHAR_ID, PREDEF_TYPE_UFRACT_ID, PREDEF_TYPE_UINT128_ID, PREDEF_TYPE_UINT_ID, PREDEF_TYPE_ULONG_ACCUM_ID, PREDEF_TYPE_ULONG_FRACT_ID, PREDEF_TYPE_ULONG_ID, PREDEF_TYPE_ULONGLONG_ID, PREDEF_TYPE_UNKNOWN_ANY, PREDEF_TYPE_UNRESOLVED_TEMPLATE, PREDEF_TYPE_USHORT_ACCUM_ID, PREDEF_TYPE_USHORT_FRACT_ID, PREDEF_TYPE_USHORT_ID, PREDEF_TYPE_VOID_ID, and PREDEF_TYPE_WCHAR_ID.

Referenced by MakeTypeID().

Variable Documentation

◆ NUM_PREDEF_IDENT_IDS

const unsigned int clang::serialization::NUM_PREDEF_IDENT_IDS = 1

The number of predefined identifier IDs.

Definition at line 66 of file ASTBitCodes.h.

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

◆ NUM_PREDEF_MACRO_IDS

const unsigned int clang::serialization::NUM_PREDEF_MACRO_IDS = 1

The number of predefined macro IDs.

Definition at line 164 of file ASTBitCodes.h.

Referenced by clang::ASTReader::getGlobalMacroID(), and clang::ASTReader::getMacro().

◆ NUM_PREDEF_PP_ENTITY_IDS

const unsigned int clang::serialization::NUM_PREDEF_PP_ENTITY_IDS = 1

The number of predefined preprocessed entity IDs.

Definition at line 289 of file ASTBitCodes.h.

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

◆ NUM_PREDEF_SELECTOR_IDS

const unsigned int clang::serialization::NUM_PREDEF_SELECTOR_IDS = 1

The number of predefined selector IDs.

Definition at line 170 of file ASTBitCodes.h.

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

◆ NUM_PREDEF_SUBMODULE_IDS

const unsigned int clang::serialization::NUM_PREDEF_SUBMODULE_IDS = 1

The number of predefined submodule IDs.

Definition at line 188 of file ASTBitCodes.h.

Referenced by clang::ASTReader::getGlobalSubmoduleID(), clang::ASTReader::getModuleFileID(), and clang::ASTReader::getSubmodule().

◆ VERSION_MAJOR

const unsigned clang::serialization::VERSION_MAJOR = 31

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

Referenced by getModuleContextHash(), clang::CompilerInvocation::getModuleHash(), and clang::ASTReader::readASTFileControlBlock().

◆ VERSION_MINOR

const unsigned clang::serialization::VERSION_MINOR = 1

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

Referenced by getModuleContextHash(), and clang::CompilerInvocation::getModuleHash().