@@ -4148,13 +4148,6 @@ void NominalTypeDecl::synthesizeSemanticMembersIfNeeded(DeclName member) {
4148
4148
}
4149
4149
}
4150
4150
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
-
4158
4151
ClassDecl::ClassDecl (SourceLoc ClassLoc, Identifier Name, SourceLoc NameLoc,
4159
4152
MutableArrayRef<TypeLoc> Inherited,
4160
4153
GenericParamList *GenericParams, DeclContext *Parent)
@@ -4276,7 +4269,7 @@ bool ClassDecl::isIncompatibleWithWeakReferences() const {
4276
4269
4277
4270
bool ClassDecl::inheritsSuperclassInitializers () const {
4278
4271
// If there's no superclass, there's nothing to inherit.
4279
- if (!getSuperclass ())
4272
+ if (!getSuperclassDecl ())
4280
4273
return false ;
4281
4274
4282
4275
auto &ctx = getASTContext ();
@@ -4294,19 +4287,11 @@ AncestryOptions ClassDecl::checkAncestry() const {
4294
4287
AncestryFlags
4295
4288
ClassAncestryFlagsRequest::evaluate (Evaluator &evaluator,
4296
4289
ClassDecl *value) const {
4297
- llvm::SmallPtrSet<const ClassDecl *, 8 > visited;
4298
-
4299
4290
AncestryOptions result;
4300
4291
const ClassDecl *CD = value;
4301
4292
auto *M = value->getParentModule ();
4302
4293
4303
4294
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
-
4310
4295
if (CD->isGenericContext ())
4311
4296
result |= AncestryFlags::Generic;
4312
4297
@@ -4496,10 +4481,9 @@ ClassDecl::findImplementingMethod(const AbstractFunctionDecl *Method) const {
4496
4481
bool ClassDecl::walkSuperclasses (
4497
4482
llvm::function_ref<TypeWalker::Action(ClassDecl *)> fn) const {
4498
4483
4499
- SmallPtrSet<ClassDecl *, 8 > seen;
4500
4484
auto *cls = const_cast <ClassDecl *>(this );
4501
4485
4502
- while (cls && seen. insert (cls). second ) {
4486
+ while (cls) {
4503
4487
switch (fn (cls)) {
4504
4488
case TypeWalker::Action::Stop:
4505
4489
return true ;
0 commit comments