From f0d4c7e4b7905d2a085de3b408c45fcd717ca958 Mon Sep 17 00:00:00 2001 From: Becca Royal-Gordon Date: Wed, 3 Dec 2025 15:09:57 -0800 Subject: [PATCH] [NFC] [IRGen] Move construction of CalleeInfo rdar://149982943 --- lib/IRGen/IRGenSIL.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/IRGen/IRGenSIL.cpp b/lib/IRGen/IRGenSIL.cpp index 2cb8810179052..aadd830f6e990 100644 --- a/lib/IRGen/IRGenSIL.cpp +++ b/lib/IRGen/IRGenSIL.cpp @@ -3593,13 +3593,12 @@ Callee LoweredValue::getCallee(IRGenFunction &IGF, } static std::unique_ptr 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: { @@ -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]));