[SIL] Teach *ApplyInst to traffic in SubstitutionMap.

Push SubstitutionMaps through most of SILGen and the SIL optimizers
that involve the various *ApplyInsts.
This commit is contained in:
Doug Gregor
2018-05-04 15:11:45 -07:00
parent 04e6e5d7a6
commit 4b5abbddbc
44 changed files with 208 additions and 313 deletions

View File

@@ -303,7 +303,7 @@ void SILGenFunction::emitCaptures(SILLocation loc,
ManagedValue
SILGenFunction::emitClosureValue(SILLocation loc, SILDeclRef constant,
CanType expectedType,
SubstitutionList subs) {
SubstitutionMap subs) {
auto closure = *constant.getAnyFunctionRef();
auto captureInfo = closure.getCaptureInfo();
auto loweredCaptureInfo = SGM.Types.getLoweredLocalCaptures(closure);
@@ -326,7 +326,7 @@ SILGenFunction::emitClosureValue(SILLocation loc, SILDeclRef constant,
// If we have a closure expression in generic context, Sema won't give
// us substitutions, so we just use the forwarding substitutions from
// context.
subs = getForwardingSubstitutions();
subs = getForwardingSubstitutionMap();
}
bool wasSpecialized = false;