@@ -3289,8 +3289,6 @@ class VariableArrayType : public ArrayType {
3289
3289
class DependentSizedArrayType : public ArrayType {
3290
3290
friend class ASTContext ; // ASTContext creates these.
3291
3291
3292
- const ASTContext &Context;
3293
-
3294
3292
// / An assignment expression that will instantiate to the
3295
3293
// / size of the array.
3296
3294
// /
@@ -3301,8 +3299,8 @@ class DependentSizedArrayType : public ArrayType {
3301
3299
// / The range spanned by the left and right array brackets.
3302
3300
SourceRange Brackets;
3303
3301
3304
- DependentSizedArrayType (const ASTContext &Context, QualType et, QualType can,
3305
- Expr *e, ArraySizeModifier sm, unsigned tq,
3302
+ DependentSizedArrayType (QualType et, QualType can, Expr *e ,
3303
+ ArraySizeModifier sm, unsigned tq,
3306
3304
SourceRange brackets);
3307
3305
3308
3306
public:
@@ -3325,7 +3323,7 @@ class DependentSizedArrayType : public ArrayType {
3325
3323
return T->getTypeClass () == DependentSizedArray;
3326
3324
}
3327
3325
3328
- void Profile (llvm::FoldingSetNodeID &ID) {
3326
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
3329
3327
Profile (ID, Context, getElementType (),
3330
3328
getSizeModifier (), getIndexTypeCVRQualifiers (), getSizeExpr ());
3331
3329
}
@@ -3349,14 +3347,12 @@ class DependentSizedArrayType : public ArrayType {
3349
3347
class DependentAddressSpaceType : public Type , public llvm ::FoldingSetNode {
3350
3348
friend class ASTContext ;
3351
3349
3352
- const ASTContext &Context;
3353
3350
Expr *AddrSpaceExpr;
3354
3351
QualType PointeeType;
3355
3352
SourceLocation loc;
3356
3353
3357
- DependentAddressSpaceType (const ASTContext &Context, QualType PointeeType,
3358
- QualType can, Expr *AddrSpaceExpr,
3359
- SourceLocation loc);
3354
+ DependentAddressSpaceType (QualType PointeeType, QualType can,
3355
+ Expr *AddrSpaceExpr, SourceLocation loc);
3360
3356
3361
3357
public:
3362
3358
Expr *getAddrSpaceExpr () const { return AddrSpaceExpr; }
@@ -3370,7 +3366,7 @@ class DependentAddressSpaceType : public Type, public llvm::FoldingSetNode {
3370
3366
return T->getTypeClass () == DependentAddressSpace;
3371
3367
}
3372
3368
3373
- void Profile (llvm::FoldingSetNodeID &ID) {
3369
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
3374
3370
Profile (ID, Context, getPointeeType (), getAddrSpaceExpr ());
3375
3371
}
3376
3372
@@ -3391,16 +3387,15 @@ class DependentAddressSpaceType : public Type, public llvm::FoldingSetNode {
3391
3387
class DependentSizedExtVectorType : public Type , public llvm ::FoldingSetNode {
3392
3388
friend class ASTContext ;
3393
3389
3394
- const ASTContext &Context;
3395
3390
Expr *SizeExpr;
3396
3391
3397
3392
// / The element type of the array.
3398
3393
QualType ElementType;
3399
3394
3400
3395
SourceLocation loc;
3401
3396
3402
- DependentSizedExtVectorType (const ASTContext &Context , QualType ElementType ,
3403
- QualType can, Expr *SizeExpr, SourceLocation loc);
3397
+ DependentSizedExtVectorType (QualType ElementType , QualType can ,
3398
+ Expr *SizeExpr, SourceLocation loc);
3404
3399
3405
3400
public:
3406
3401
Expr *getSizeExpr () const { return SizeExpr; }
@@ -3414,7 +3409,7 @@ class DependentSizedExtVectorType : public Type, public llvm::FoldingSetNode {
3414
3409
return T->getTypeClass () == DependentSizedExtVector;
3415
3410
}
3416
3411
3417
- void Profile (llvm::FoldingSetNodeID &ID) {
3412
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
3418
3413
Profile (ID, Context, getElementType (), getSizeExpr ());
3419
3414
}
3420
3415
@@ -3513,14 +3508,12 @@ class VectorType : public Type, public llvm::FoldingSetNode {
3513
3508
class DependentVectorType : public Type , public llvm ::FoldingSetNode {
3514
3509
friend class ASTContext ;
3515
3510
3516
- const ASTContext &Context;
3517
3511
QualType ElementType;
3518
3512
Expr *SizeExpr;
3519
3513
SourceLocation Loc;
3520
3514
3521
- DependentVectorType (const ASTContext &Context, QualType ElementType,
3522
- QualType CanonType, Expr *SizeExpr,
3523
- SourceLocation Loc, VectorType::VectorKind vecKind);
3515
+ DependentVectorType (QualType ElementType, QualType CanonType, Expr *SizeExpr,
3516
+ SourceLocation Loc, VectorType::VectorKind vecKind);
3524
3517
3525
3518
public:
3526
3519
Expr *getSizeExpr () const { return SizeExpr; }
@@ -3537,7 +3530,7 @@ class DependentVectorType : public Type, public llvm::FoldingSetNode {
3537
3530
return T->getTypeClass () == DependentVector;
3538
3531
}
3539
3532
3540
- void Profile (llvm::FoldingSetNodeID &ID) {
3533
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
3541
3534
Profile (ID, Context, getElementType (), getSizeExpr (), getVectorKind ());
3542
3535
}
3543
3536
@@ -3719,15 +3712,13 @@ class ConstantMatrixType final : public MatrixType {
3719
3712
class DependentSizedMatrixType final : public MatrixType {
3720
3713
friend class ASTContext ;
3721
3714
3722
- const ASTContext &Context;
3723
3715
Expr *RowExpr;
3724
3716
Expr *ColumnExpr;
3725
3717
3726
3718
SourceLocation loc;
3727
3719
3728
- DependentSizedMatrixType (const ASTContext &Context, QualType ElementType,
3729
- QualType CanonicalType, Expr *RowExpr,
3730
- Expr *ColumnExpr, SourceLocation loc);
3720
+ DependentSizedMatrixType (QualType ElementType, QualType CanonicalType,
3721
+ Expr *RowExpr, Expr *ColumnExpr, SourceLocation loc);
3731
3722
3732
3723
public:
3733
3724
Expr *getRowExpr () const { return RowExpr; }
@@ -3738,7 +3729,7 @@ class DependentSizedMatrixType final : public MatrixType {
3738
3729
return T->getTypeClass () == DependentSizedMatrix;
3739
3730
}
3740
3731
3741
- void Profile (llvm::FoldingSetNodeID &ID) {
3732
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
3742
3733
Profile (ID, Context, getElementType (), getRowExpr (), getColumnExpr ());
3743
3734
}
3744
3735
@@ -4749,15 +4740,12 @@ class TypeOfExprType : public Type {
4749
4740
// / This class is used internally by the ASTContext to manage
4750
4741
// / canonical, dependent types, only. Clients will only see instances
4751
4742
// / of this class via TypeOfExprType nodes.
4752
- class DependentTypeOfExprType
4753
- : public TypeOfExprType, public llvm::FoldingSetNode {
4754
- const ASTContext &Context;
4755
-
4743
+ class DependentTypeOfExprType : public TypeOfExprType ,
4744
+ public llvm::FoldingSetNode {
4756
4745
public:
4757
- DependentTypeOfExprType (const ASTContext &Context, Expr *E, TypeOfKind Kind)
4758
- : TypeOfExprType(E, Kind), Context(Context) {}
4746
+ DependentTypeOfExprType (Expr *E, TypeOfKind Kind) : TypeOfExprType(E, Kind) {}
4759
4747
4760
- void Profile (llvm::FoldingSetNodeID &ID) {
4748
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
4761
4749
Profile (ID, Context, getUnderlyingExpr (),
4762
4750
getKind () == TypeOfKind::Unqualified);
4763
4751
}
@@ -4833,12 +4821,10 @@ class DecltypeType : public Type {
4833
4821
// / canonical, dependent types, only. Clients will only see instances
4834
4822
// / of this class via DecltypeType nodes.
4835
4823
class DependentDecltypeType : public DecltypeType , public llvm ::FoldingSetNode {
4836
- const ASTContext &Context;
4837
-
4838
4824
public:
4839
- DependentDecltypeType (const ASTContext &Context, Expr *E);
4825
+ DependentDecltypeType (Expr *E, QualType UnderlyingTpe );
4840
4826
4841
- void Profile (llvm::FoldingSetNodeID &ID) {
4827
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
4842
4828
Profile (ID, Context, getUnderlyingExpr ());
4843
4829
}
4844
4830
@@ -6657,12 +6643,10 @@ class BitIntType final : public Type, public llvm::FoldingSetNode {
6657
6643
6658
6644
class DependentBitIntType final : public Type, public llvm::FoldingSetNode {
6659
6645
friend class ASTContext ;
6660
- const ASTContext &Context;
6661
6646
llvm::PointerIntPair<Expr*, 1 , bool > ExprAndUnsigned;
6662
6647
6663
6648
protected:
6664
- DependentBitIntType (const ASTContext &Context, bool IsUnsigned,
6665
- Expr *NumBits);
6649
+ DependentBitIntType (bool IsUnsigned, Expr *NumBits);
6666
6650
6667
6651
public:
6668
6652
bool isUnsigned () const ;
@@ -6672,7 +6656,7 @@ class DependentBitIntType final : public Type, public llvm::FoldingSetNode {
6672
6656
bool isSugared () const { return false ; }
6673
6657
QualType desugar () const { return QualType (this , 0 ); }
6674
6658
6675
- void Profile (llvm::FoldingSetNodeID &ID) {
6659
+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context ) {
6676
6660
Profile (ID, Context, isUnsigned (), getNumBitsExpr ());
6677
6661
}
6678
6662
static void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context,
0 commit comments