[clang] [serialization] No transitive type change (PR #92511)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 03:14:55 PDT 2024
================
@@ -70,38 +71,51 @@ using DeclID = DeclIDBase::DeclID;
/// 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
+/// 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". Values from NUM_PREDEF_TYPE_IDs are
----------------
ilya-biryukov wrote:
NIT: maybe explain in a comment that predefined types always have a module file index of 0 (i.e. do not belong to any module file)?
https://github.com/llvm/llvm-project/pull/92511
More information about the cfe-commits
mailing list