Skip to content

Commit a6fbc59

Browse files
committed
AST: Simplify ArchetypeType::requiresClass()
1 parent 5f26fa8 commit a6fbc59

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/AST/Type.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,14 +3206,8 @@ PrimaryArchetypeType::getNew(const ASTContext &Ctx,
32063206
}
32073207

32083208
bool ArchetypeType::requiresClass() const {
3209-
if (Bits.ArchetypeType.HasSuperclass)
3210-
return true;
32113209
if (auto layout = getLayoutConstraint())
3212-
if (layout->isClass())
3213-
return true;
3214-
for (ProtocolDecl *conformed : getConformsTo())
3215-
if (conformed->requiresClass())
3216-
return true;
3210+
return layout->isClass();
32173211
return false;
32183212
}
32193213

0 commit comments

Comments
 (0)