SIL: Change SILType::subst to be SubstitutionMap-based.

This simplifies the SILType substitution APIs and brings them in line with Doug and Slava's refactorings to improve AST-level type substitution. NFC intended.
This commit is contained in:
Joe Groff
2016-12-14 14:33:32 -08:00
parent eaa7cb9f9c
commit b6823b930b
26 changed files with 63 additions and 110 deletions

View File

@@ -776,9 +776,7 @@ specializePartialApply(PartialApplyInst *PartialApply,
ClonedFn);
CanSILFunctionType CanFnTy = ClonedFn->getLoweredFunctionType();
auto const &Subs = PartialApply->getSubstitutions();
CanSILFunctionType SubstCalleeTy = CanFnTy->substGenericArgs(M,
M.getSwiftModule(),
Subs);
CanSILFunctionType SubstCalleeTy = CanFnTy->substGenericArgs(M, Subs);
return Builder.createPartialApply(PartialApply->getLoc(), FunctionRef,
SILType::getPrimitiveObjectType(SubstCalleeTy),
PartialApply->getSubstitutions(), Args,