Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/IRGen/IRGenSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3593,13 +3593,12 @@ Callee LoweredValue::getCallee(IRGenFunction &IGF,
}

static std::unique_ptr<CallEmission> getCallEmissionForLoweredValue(
IRGenSILFunction &IGF, CanSILFunctionType origCalleeType,
CanSILFunctionType substCalleeType, const LoweredValue &lv,
llvm::Value *selfValue, SubstitutionMap substitutions,
WitnessMetadata *witnessMetadata) {
Callee callee = lv.getCallee(IGF, selfValue,
CalleeInfo(origCalleeType, substCalleeType,
substitutions));
IRGenSILFunction &IGF, const LoweredValue &lv, CalleeInfo &&info,
llvm::Value *selfValue, WitnessMetadata *witnessMetadata) {
auto origCalleeType = info.OrigFnType;
auto substCalleeType = info.SubstFnType;

Callee callee = lv.getCallee(IGF, selfValue, std::move(info));

switch (origCalleeType->getRepresentation()) {
case SILFunctionType::Representation::WitnessMethod: {
Expand Down Expand Up @@ -3891,11 +3890,12 @@ void IRGenSILFunction::visitFullApplySite(FullApplySite site) {
GenericContextScope scope(IGM,
origCalleeType->getInvocationGenericSignature());

CalleeInfo info(origCalleeType, substCalleeType, site.getSubstitutionMap());

Explosion llArgs;
WitnessMetadata witnessMetadata;
auto emission = getCallEmissionForLoweredValue(
*this, origCalleeType, substCalleeType, calleeLV, selfValue,
site.getSubstitutionMap(), &witnessMetadata);
*this, calleeLV, std::move(info), selfValue, &witnessMetadata);

if (site.hasIndirectSILResults()) {
emission->setIndirectReturnAddress(getLoweredAddress(site.getIndirectSILResults()[0]));
Expand Down