[clang] [Clang][AST][NFC] Store template parameter position for TemplateTypeParmType in TypeBit (PR #102481)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 12:05:45 PDT 2024
================
@@ -6131,52 +6149,30 @@ class BTFTagAttributedType : public Type, public llvm::FoldingSetNode {
class TemplateTypeParmType : public Type, public llvm::FoldingSetNode {
friend class ASTContext; // ASTContext creates these
- // Helper data collector for canonical types.
- struct CanonicalTTPTInfo {
- unsigned Depth : 15;
- unsigned ParameterPack : 1;
- unsigned Index : 16;
- };
-
- union {
- // Info for the canonical type.
- CanonicalTTPTInfo CanTTPTInfo;
-
- // Info for the non-canonical type.
- TemplateTypeParmDecl *TTPDecl;
- };
+ // The associated TemplateTypeParmDecl for the non-canonical type.
+ TemplateTypeParmDecl *TTPDecl;
----------------
sdkrystian wrote:
There are a few other cases where we can tail allocate data for types... I think I'll submit a patch that tail allocates members for a few other `Type` derived classes.
https://github.com/llvm/llvm-project/pull/102481
More information about the cfe-commits
mailing list