@@ -3593,13 +3593,12 @@ Callee LoweredValue::getCallee(IRGenFunction &IGF,
35933593}
35943594
35953595static std::unique_ptr<CallEmission> getCallEmissionForLoweredValue (
3596- IRGenSILFunction &IGF, CanSILFunctionType origCalleeType,
3597- CanSILFunctionType substCalleeType, const LoweredValue &lv,
3598- llvm::Value *selfValue, SubstitutionMap substitutions,
3599- WitnessMetadata *witnessMetadata) {
3600- Callee callee = lv.getCallee (IGF, selfValue,
3601- CalleeInfo (origCalleeType, substCalleeType,
3602- substitutions));
3596+ IRGenSILFunction &IGF, const LoweredValue &lv, CalleeInfo &&info,
3597+ llvm::Value *selfValue, WitnessMetadata *witnessMetadata) {
3598+ auto origCalleeType = info.OrigFnType ;
3599+ auto substCalleeType = info.SubstFnType ;
3600+
3601+ Callee callee = lv.getCallee (IGF, selfValue, std::move (info));
36033602
36043603 switch (origCalleeType->getRepresentation ()) {
36053604 case SILFunctionType::Representation::WitnessMethod: {
@@ -3891,11 +3890,12 @@ void IRGenSILFunction::visitFullApplySite(FullApplySite site) {
38913890 GenericContextScope scope (IGM,
38923891 origCalleeType->getInvocationGenericSignature ());
38933892
3893+ CalleeInfo info (origCalleeType, substCalleeType, site.getSubstitutionMap ());
3894+
38943895 Explosion llArgs;
38953896 WitnessMetadata witnessMetadata;
38963897 auto emission = getCallEmissionForLoweredValue (
3897- *this , origCalleeType, substCalleeType, calleeLV, selfValue,
3898- site.getSubstitutionMap (), &witnessMetadata);
3898+ *this , calleeLV, std::move (info), selfValue, &witnessMetadata);
38993899
39003900 if (site.hasIndirectSILResults ()) {
39013901 emission->setIndirectReturnAddress (getLoweredAddress (site.getIndirectSILResults ()[0 ]));
0 commit comments