@@ -427,6 +427,15 @@ class GenericSignatureBuilder {
427427 Type superclass,
428428 FloatingRequirementSource source);
429429
430+ // / Update the layout constraint for the equivalence class of \c T.
431+ // /
432+ // / This assumes that the constraint has already been recorded.
433+ // /
434+ // / \returns true if anything in the equivalence class changed, false
435+ // / otherwise.
436+ bool updateLayout (ResolvedType type,
437+ LayoutConstraint layout);
438+
430439private:
431440 // / Add a new superclass requirement specifying that the given
432441 // / potential archetype has the given type as an ancestor.
@@ -528,8 +537,7 @@ class GenericSignatureBuilder {
528537 LookUpConformanceInBuilder getLookupConformanceFn ();
529538
530539 // / Lookup a protocol conformance in a module-agnostic manner.
531- ProtocolConformanceRef lookupConformance (CanType dependentType,
532- Type conformingReplacementType,
540+ ProtocolConformanceRef lookupConformance (Type conformingReplacementType,
533541 ProtocolDecl *conformedProtocol);
534542
535543 // / Enumerate the requirements that describe the signature of this
@@ -653,6 +661,8 @@ class GenericSignatureBuilder {
653661
654662 void diagnoseRedundantRequirements () const ;
655663
664+ void diagnoseConflictingConcreteTypeRequirements () const ;
665+
656666 bool hasExplicitConformancesImpliedByConcrete () const ;
657667
658668 // / Describes the relationship between a given constraint and
@@ -696,34 +706,6 @@ class GenericSignatureBuilder {
696706 Diag<Type, T> redundancyDiag,
697707 Diag<unsigned, Type, T> otherNoteDiag);
698708
699- // / Check a list of constraints, removing self-derived constraints
700- // / and diagnosing redundant constraints.
701- // /
702- // / \param isSuitableRepresentative Determines whether the given constraint
703- // / is a suitable representative.
704- // /
705- // / \param checkConstraint Checks the given constraint against the
706- // / canonical constraint to determine which diagnostics (if any) should be
707- // / emitted.
708- // /
709- // / \returns the representative constraint.
710- template <typename T, typename DiagT>
711- Constraint<T> checkConstraintList (
712- TypeArrayView<GenericTypeParamType> genericParams,
713- std::vector<Constraint<T>> &constraints,
714- RequirementKind kind,
715- llvm::function_ref<bool (const Constraint<T> &)>
716- isSuitableRepresentative,
717- llvm::function_ref<
718- ConstraintRelation(const Constraint<T>&)>
719- checkConstraint,
720- Optional<Diag<unsigned, Type, DiagT, DiagT>>
721- conflictingDiag,
722- Diag<Type, DiagT> redundancyDiag,
723- Diag<unsigned, Type, DiagT> otherNoteDiag,
724- llvm::function_ref<DiagT(const T&)> diagValue,
725- bool removeSelfDerived);
726-
727709 // / Check the concrete type constraints within the equivalence
728710 // / class of the given potential archetype.
729711 void checkConcreteTypeConstraints (
0 commit comments