@@ -3527,16 +3527,14 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode {
35273527 QualType PointeeType;
35283528
35293529 // / The class of which the pointee is a member. Must ultimately be a
3530- // / CXXRecordType , but could be a typedef or a template parameter too.
3531- NestedNameSpecifier *Qualifier ;
3530+ // / RecordType , but could be a typedef or a template parameter too.
3531+ const Type *Class ;
35323532
3533- MemberPointerType (QualType Pointee, NestedNameSpecifier *Qualifier,
3534- QualType CanonicalPtr)
3533+ MemberPointerType (QualType Pointee, const Type *Cls, QualType CanonicalPtr)
35353534 : Type(MemberPointer, CanonicalPtr,
3536- (toTypeDependence(Qualifier->getDependence ()) &
3537- ~TypeDependence::VariablyModified) |
3535+ (Cls->getDependence () & ~TypeDependence::VariablyModified) |
35383536 Pointee->getDependence()),
3539- PointeeType(Pointee), Qualifier(Qualifier ) {}
3537+ PointeeType(Pointee), Class(Cls ) {}
35403538
35413539public:
35423540 QualType getPointeeType () const { return PointeeType; }
@@ -3553,21 +3551,21 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode {
35533551 return !PointeeType->isFunctionProtoType ();
35543552 }
35553553
3556- NestedNameSpecifier * getQualifier () const { return Qualifier ; }
3554+ const Type * getClass () const { return Class ; }
35573555 CXXRecordDecl *getMostRecentCXXRecordDecl () const ;
35583556
3559- bool isSugared () const ;
3560- QualType desugar () const {
3561- return isSugared () ? getCanonicalTypeInternal () : QualType (this , 0 );
3562- }
3557+ bool isSugared () const { return false ; }
3558+ QualType desugar () const { return QualType (this , 0 ); }
35633559
35643560 void Profile (llvm::FoldingSetNodeID &ID) {
3565- Profile (ID, getPointeeType (), getQualifier (), getMostRecentCXXRecordDecl ());
3561+ Profile (ID, getPointeeType (), getClass ());
35663562 }
35673563
35683564 static void Profile (llvm::FoldingSetNodeID &ID, QualType Pointee,
3569- const NestedNameSpecifier *Qualifier,
3570- const CXXRecordDecl *Cls);
3565+ const Type *Class) {
3566+ ID.AddPointer (Pointee.getAsOpaquePtr ());
3567+ ID.AddPointer (Class);
3568+ }
35713569
35723570 static bool classof (const Type *T) {
35733571 return T->getTypeClass () == MemberPointer;
0 commit comments