AST: Simplify SubstitutionMap::get()

This commit is contained in:
Slava Pestov
2024-09-04 11:21:49 -04:00
parent 851a829063
commit 7e4e79c69f
4 changed files with 38 additions and 25 deletions

View File

@@ -104,6 +104,15 @@ public:
ArrayRef<Type> replacementTypes,
LookupConformanceFn lookupConformance);
/// Build a substitution map from the substitutions represented by
/// the given in-flight substitution.
///
/// This function should generally only be used by the substitution
/// subsystem.
static SubstitutionMap get(GenericSignature genericSig,
ArrayRef<Type> replacementTypes,
InFlightSubstitution &IFS);
/// Build a substitution map from the substitutions represented by
/// the given in-flight substitution.
///

View File

@@ -998,9 +998,7 @@ case TypeKind::Id:
return subs;
auto sig = subs.getGenericSignature();
return SubstitutionMap::get(sig,
QueryReplacementTypeArray{sig, newSubs},
LookUpConformanceInModule());
return SubstitutionMap::get(sig, newSubs, LookUpConformanceInModule());
}
CanType transformSILField(CanType fieldTy, TypePosition pos) {