Skip to content

Commit a10c5ed

Browse files
committed
GSB: Remove checkSuperclassConstraints() and checkLayoutConstraints()
1 parent 4bf2398 commit a10c5ed

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

include/swift/AST/GenericSignatureBuilder.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -723,23 +723,12 @@ class GenericSignatureBuilder {
723723
TypeArrayView<GenericTypeParamType> genericParams,
724724
EquivalenceClass *equivClass);
725725

726-
/// Check the superclass constraints within the equivalence
727-
/// class of the given potential archetype.
728-
void checkSuperclassConstraints(
729-
TypeArrayView<GenericTypeParamType> genericParams,
730-
EquivalenceClass *equivClass);
731-
732726
/// Check conformance constraints within the equivalence class of the
733727
/// given potential archetype.
734728
void checkConformanceConstraints(
735729
TypeArrayView<GenericTypeParamType> genericParams,
736730
EquivalenceClass *equivClass);
737731

738-
/// Check layout constraints within the equivalence class of the given
739-
/// potential archetype.
740-
void checkLayoutConstraints(TypeArrayView<GenericTypeParamType> genericParams,
741-
EquivalenceClass *equivClass);
742-
743732
/// Check same-type constraints within the equivalence class of the
744733
/// given potential archetype.
745734
void checkSameTypeConstraints(

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6380,13 +6380,10 @@ GenericSignatureBuilder::finalize(TypeArrayView<GenericTypeParamType> genericPar
63806380
}
63816381

63826382
equivClass.recursiveSuperclassType = true;
6383-
} else {
6384-
checkSuperclassConstraints(genericParams, &equivClass);
63856383
}
63866384
}
63876385

63886386
checkConformanceConstraints(genericParams, &equivClass);
6389-
checkLayoutConstraints(genericParams, &equivClass);
63906387
};
63916388

63926389
if (!Impl->ExplicitSameTypeRequirements.empty()) {
@@ -7926,22 +7923,6 @@ void GenericSignatureBuilder::checkConcreteTypeConstraints(
79267923
diag::same_type_redundancy_here);
79277924
}
79287925

7929-
void GenericSignatureBuilder::checkSuperclassConstraints(
7930-
TypeArrayView<GenericTypeParamType> genericParams,
7931-
EquivalenceClass *equivClass) {
7932-
assert(equivClass->superclass && "No superclass constraint?");
7933-
7934-
removeSelfDerived(*this, equivClass->superclassConstraints, /*proto=*/nullptr);
7935-
}
7936-
7937-
void GenericSignatureBuilder::checkLayoutConstraints(
7938-
TypeArrayView<GenericTypeParamType> genericParams,
7939-
EquivalenceClass *equivClass) {
7940-
if (!equivClass->layout) return;
7941-
7942-
removeSelfDerived(*this, equivClass->layoutConstraints, /*proto=*/nullptr);
7943-
}
7944-
79457926
bool GenericSignatureBuilder::isRedundantExplicitRequirement(
79467927
const ExplicitRequirement &req) const {
79477928
assert(Impl->computedRedundantRequirements &&

0 commit comments

Comments
 (0)