Skip to content

Commit ba6582d

Browse files
committed
Sema: Remove various calls to getAllConformances()
1 parent fb8bd3a commit ba6582d

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,8 +2700,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
27002700
checkEnumRawValues(TC, ED);
27012701
}
27022702

2703-
ED->getAllConformances();
2704-
27052703
TC.checkDeclCircularity(ED);
27062704
TC.ConformanceContexts.push_back(ED);
27072705
}
@@ -2725,8 +2723,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
27252723

27262724
checkAccessControl(TC, SD);
27272725

2728-
SD->getAllConformances();
2729-
27302726
TC.checkDeclCircularity(SD);
27312727
TC.ConformanceContexts.push_back(SD);
27322728
}
@@ -2941,8 +2937,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
29412937
}
29422938
}
29432939

2944-
CD->getAllConformances();
2945-
29462940
TC.checkDeclAttributes(CD);
29472941

29482942
checkInheritanceClause(CD);
@@ -3169,13 +3163,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
31693163
TC.checkDeclAttributes(ED);
31703164

31713165
checkAccessControl(TC, ED);
3172-
3173-
// Trigger the creation of all of the conformances associated with this
3174-
// nominal type.
3175-
// FIXME: This is a hack to make sure that the type checker precomputes
3176-
// enough information for later passes that might query conformances.
3177-
if (auto nominal = ED->getExtendedNominal())
3178-
(void) nominal->getAllConformances();
31793166
}
31803167

31813168
void visitTopLevelCodeDecl(TopLevelCodeDecl *TLCD) {

lib/Sema/TypeChecker.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,8 @@ static void typeCheckFunctionsAndExternalDecls(SourceFile &SF, TypeChecker &TC)
334334
TC.checkFunctionErrorHandling(AFD);
335335
continue;
336336
}
337-
if (auto nominal = dyn_cast<NominalTypeDecl>(decl)) {
338-
(void)nominal->getAllConformances();
337+
if (isa<NominalTypeDecl>(decl))
339338
continue;
340-
}
341339
if (isa<VarDecl>(decl))
342340
continue;
343341
llvm_unreachable("Unhandled external definition kind");

0 commit comments

Comments
 (0)