[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 27 12:13:04 PST 2024
================
@@ -2000,6 +2001,21 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
unsigned NumExpansions;
};
+ class CountAttributedTypeBitfields {
+ friend class CountAttributedType;
+
+ LLVM_PREFERRED_TYPE(TypeBitfields)
+ unsigned : NumTypeBits;
+
+ /// The limit is 15.
----------------
AaronBallman wrote:
I think `NumTypesBits` is 19 (it's not based on the underlying type of the enum, `llvm::BitWidth` is clever there and uses the maximal enum value to calculate the number of bits needed), this structure adds 6 more bits, so that's up to 25 bits. I would expect that means we have 7 bits leftover so we keep this to a 32-bit value.
https://github.com/llvm/llvm-project/pull/78000
More information about the cfe-commits
mailing list