@@ -258,11 +258,13 @@ class GenericSignatureBuilder {
258
258
Type getTypeInContext (GenericSignatureBuilder &builder,
259
259
GenericEnvironment *genericEnv);
260
260
261
- // / Dump a debugging representation of this equivalence class.
262
- void dump (llvm::raw_ostream &out) const ;
261
+ // / Dump a debugging representation of this equivalence class,
262
+ void dump (llvm::raw_ostream &out,
263
+ GenericSignatureBuilder *builder = nullptr ) const ;
263
264
264
- LLVM_ATTRIBUTE_DEPRECATED (void dump () const ,
265
- "only for use in the debugger");
265
+ LLVM_ATTRIBUTE_DEPRECATED (
266
+ void dump (GenericSignatureBuilder *builder = nullptr ) const ,
267
+ "only for use in the debugger");
266
268
267
269
// / Caches.
268
270
@@ -271,9 +273,8 @@ class GenericSignatureBuilder {
271
273
// / The cached anchor itself.
272
274
Type anchor;
273
275
274
- // / The number of members of the equivalence class when the archetype
275
- // / anchor was cached.
276
- unsigned numMembers;
276
+ // / The generation at which the anchor was last computed.
277
+ unsigned lastGeneration;
277
278
} archetypeAnchorCache;
278
279
279
280
// / Describes a cached nested type.
@@ -444,6 +445,11 @@ class GenericSignatureBuilder {
444
445
// / Note that we have added the nested type nestedPA
445
446
void addedNestedType (PotentialArchetype *nestedPA);
446
447
448
+ // / Add a rewrite rule for a same-type constraint between the given
449
+ // / types.
450
+ void addSameTypeRewriteRule (PotentialArchetype *type1,
451
+ PotentialArchetype *type2);
452
+
447
453
// / \brief Add a new conformance requirement specifying that the given
448
454
// / potential archetypes are equivalent.
449
455
ConstraintResult addSameTypeRequirementBetweenArchetypes (
@@ -802,6 +808,12 @@ class GenericSignatureBuilder {
802
808
// / Determine whether the two given types are in the same equivalence class.
803
809
bool areInSameEquivalenceClass (Type type1, Type type2);
804
810
811
+ // / Simplify the given dependent type down to its canonical representation.
812
+ // /
813
+ // / \returns null if the type involved dependent member types that
814
+ // / don't have associated types.
815
+ Type getCanonicalTypeParameter (Type type);
816
+
805
817
// / Verify the correctness of the given generic signature.
806
818
// /
807
819
// / This routine will test that the given generic signature is both minimal
0 commit comments