clang API Documentation
| typedef uint32_t clang::serialization::CXXBaseSpecifiersID |
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.
| typedef uint32_t clang::serialization::IdentID |
An ID number that refers to an identifier in an AST file.
Definition at line 125 of file ASTBitCodes.h.
| typedef uint32_t clang::serialization::IdentifierID |
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.
| typedef uint32_t clang::serialization::PreprocessedEntityID |
An ID number that refers to an entity in the detailed preprocessing record.
Definition at line 142 of file ASTBitCodes.h.
| typedef uint32_t clang::serialization::SelectorID |
An ID number that refers to an ObjC selector in an AST file.
Definition at line 131 of file ASTBitCodes.h.
| typedef uint32_t clang::serialization::SubmoduleID |
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.
Record types that occur within the AST block itself.
| 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 |
| 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.
| 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.
| 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.
| 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.
Definition at line 513 of file ASTBitCodes.h.
Record types used within a preprocessor block.
| 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.
Definition at line 476 of file ASTBitCodes.h.
Record types used within a submodule description block.
Definition at line 526 of file ASTBitCodes.h.
| unsigned clang::serialization::ComputeHash | ( | Selector | Sel | ) |
Definition at line 68 of file ASTCommon.cpp.
References clang::Selector::getIdentifierInfoForSlot(), and clang::Selector::getNumArgs().
Referenced by clang::serialization::reader::ASTDeclContextNameLookupTrait::ComputeHash(), and clang::serialization::reader::ASTSelectorLookupTrait::ComputeHash().
| TypeID clang::serialization::MakeTypeID | ( | ASTContext & | Context, |
| QualType | T, | ||
| IdxForTypeTy | IdxForType | ||
| ) |
Definition at line 34 of file ASTCommon.h.
References clang::serialization::TypeIdx::asTypeID(), clang::ASTContext::AutoDeductTy, clang::ASTContext::AutoRRefDeductTy, clang::QualType::getLocalFastQualifiers(), clang::QualType::getTypePtr(), clang::QualType::hasLocalNonFastQualifiers(), clang::QualType::hasLocalQualifiers(), clang::QualType::isNull(), PREDEF_TYPE_AUTO_DEDUCT, PREDEF_TYPE_AUTO_RREF_DEDUCT, PREDEF_TYPE_NULL_ID, clang::QualType::removeLocalFastQualifiers(), and TypeIdxFromBuiltin().
Referenced by clang::ASTWriter::GetOrCreateTypeID(), and clang::ASTWriter::getTypeID().
| serialization::TypeIdx clang::serialization::TypeIdxFromBuiltin | ( | const BuiltinType * | BT | ) |
Definition at line 25 of file ASTCommon.cpp.
References clang::BuiltinType::getKind(), PREDEF_TYPE_ARC_UNBRIDGED_CAST, PREDEF_TYPE_BOOL_ID, PREDEF_TYPE_BOUND_MEMBER, PREDEF_TYPE_CHAR16_ID, PREDEF_TYPE_CHAR32_ID, PREDEF_TYPE_CHAR_S_ID, PREDEF_TYPE_CHAR_U_ID, PREDEF_TYPE_DEPENDENT_ID, PREDEF_TYPE_DOUBLE_ID, PREDEF_TYPE_FLOAT_ID, PREDEF_TYPE_HALF_ID, PREDEF_TYPE_INT128_ID, PREDEF_TYPE_INT_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_OVERLOAD_ID, PREDEF_TYPE_PSEUDO_OBJECT, PREDEF_TYPE_SCHAR_ID, PREDEF_TYPE_SHORT_ID, PREDEF_TYPE_UCHAR_ID, PREDEF_TYPE_UINT128_ID, PREDEF_TYPE_UINT_ID, PREDEF_TYPE_ULONG_ID, PREDEF_TYPE_ULONGLONG_ID, PREDEF_TYPE_UNKNOWN_ANY, PREDEF_TYPE_USHORT_ID, PREDEF_TYPE_VOID_ID, and PREDEF_TYPE_WCHAR_ID.
Referenced by MakeTypeID().
| const unsigned int clang::serialization::NUM_PREDEF_IDENT_IDS = 1 |
The number of predefined identifier IDs.
Definition at line 128 of file ASTBitCodes.h.
Referenced by clang::ASTReader::getGlobalIdentifierID(), and clang::ASTWriter::ReaderInitialized().
| const unsigned int clang::serialization::NUM_PREDEF_PP_ENTITY_IDS = 1 |
The number of predefined preprocessed entity IDs.
Definition at line 182 of file ASTBitCodes.h.
Referenced by clang::ASTReader::getGlobalPreprocessedEntityID().
| const unsigned int clang::serialization::NUM_PREDEF_SELECTOR_IDS = 1 |
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().
| const unsigned int clang::serialization::NUM_PREDEF_SUBMODULE_IDS = 1 |
The number of predefined submodule IDs.
Definition at line 148 of file ASTBitCodes.h.
Referenced by clang::ASTReader::getSubmodule(), and clang::ASTWriter::ReaderInitialized().
| const unsigned clang::serialization::VERSION_MAJOR = 4 |
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.
| const unsigned clang::serialization::VERSION_MINOR = 0 |
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.