Skip to content

Commit 39397d7

Browse files
committed
GSB: Remove HadAnyRedundantConstraints
Redundant requirements no longer pose a problem for the new getConformanceAccessPath() implementation.
1 parent f71b55e commit 39397d7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,6 @@ struct GenericSignatureBuilder::Implementation {
470470
/// Whether there were any errors.
471471
bool HadAnyError = false;
472472

473-
/// FIXME: Hack to work around a small number of minimization bugs.
474-
bool HadAnyRedundantConstraints = false;
475-
476473
#ifndef NDEBUG
477474
/// Whether we've already finalized the builder.
478475
bool finalized = false;
@@ -5870,7 +5867,6 @@ Constraint<T> GenericSignatureBuilder::checkConstraintList(
58705867
case ConstraintRelation::Redundant:
58715868
// If this requirement is not derived or inferred (but has a useful
58725869
// location) complain that it is redundant.
5873-
Impl->HadAnyRedundantConstraints = true;
58745870
if (constraint.source->shouldDiagnoseRedundancy(true) &&
58755871
representativeConstraint &&
58765872
representativeConstraint->source->shouldDiagnoseRedundancy(false)) {
@@ -7204,10 +7200,7 @@ GenericSignature GenericSignatureBuilder::computeGenericSignature(
72047200
// will produce the same thing.
72057201
//
72067202
// We cannot do this when there were errors.
7207-
// FIXME: The HadAnyRedundantConstraints bit is a hack because we are
7208-
// over-minimizing.
7209-
if (allowBuilderToMove && !Impl->HadAnyError &&
7210-
!Impl->HadAnyRedundantConstraints) {
7203+
if (allowBuilderToMove && !Impl->HadAnyError) {
72117204
// Register this generic signature builder as the canonical builder for the
72127205
// given signature.
72137206
Context.registerGenericSignatureBuilder(sig, std::move(*this));

0 commit comments

Comments
 (0)