@@ -4148,13 +4148,6 @@ void NominalTypeDecl::synthesizeSemanticMembersIfNeeded(DeclName member) {
41484148 }
41494149}
41504150
4151- bool ClassDecl::hasCircularInheritance () const {
4152- auto &ctx = getASTContext ();
4153- auto *mutableThis = const_cast <ClassDecl *>(this );
4154- return evaluateOrDefault (ctx.evaluator ,
4155- HasCircularInheritanceRequest{mutableThis}, true );
4156- }
4157-
41584151ClassDecl::ClassDecl (SourceLoc ClassLoc, Identifier Name, SourceLoc NameLoc,
41594152 MutableArrayRef<TypeLoc> Inherited,
41604153 GenericParamList *GenericParams, DeclContext *Parent)
@@ -4276,7 +4269,7 @@ bool ClassDecl::isIncompatibleWithWeakReferences() const {
42764269
42774270bool ClassDecl::inheritsSuperclassInitializers () const {
42784271 // If there's no superclass, there's nothing to inherit.
4279- if (!getSuperclass ())
4272+ if (!getSuperclassDecl ())
42804273 return false ;
42814274
42824275 auto &ctx = getASTContext ();
@@ -4294,19 +4287,11 @@ AncestryOptions ClassDecl::checkAncestry() const {
42944287AncestryFlags
42954288ClassAncestryFlagsRequest::evaluate (Evaluator &evaluator,
42964289 ClassDecl *value) const {
4297- llvm::SmallPtrSet<const ClassDecl *, 8 > visited;
4298-
42994290 AncestryOptions result;
43004291 const ClassDecl *CD = value;
43014292 auto *M = value->getParentModule ();
43024293
43034294 do {
4304- // If we hit circularity, we will diagnose at some point in typeCheckDecl().
4305- // However we have to explicitly guard against that here because we get
4306- // called as part of the interface type request.
4307- if (!visited.insert (CD).second )
4308- break ;
4309-
43104295 if (CD->isGenericContext ())
43114296 result |= AncestryFlags::Generic;
43124297
@@ -4496,10 +4481,9 @@ ClassDecl::findImplementingMethod(const AbstractFunctionDecl *Method) const {
44964481bool ClassDecl::walkSuperclasses (
44974482 llvm::function_ref<TypeWalker::Action(ClassDecl *)> fn) const {
44984483
4499- SmallPtrSet<ClassDecl *, 8 > seen;
45004484 auto *cls = const_cast <ClassDecl *>(this );
45014485
4502- while (cls && seen. insert (cls). second ) {
4486+ while (cls) {
45034487 switch (fn (cls)) {
45044488 case TypeWalker::Action::Stop:
45054489 return true ;
0 commit comments