Skip to content

Commit f0d4c7e

Browse files
committed
[NFC] [IRGen] Move construction of CalleeInfo
rdar://149982943
1 parent 6d4c516 commit f0d4c7e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,13 +3593,12 @@ Callee LoweredValue::getCallee(IRGenFunction &IGF,
35933593
}
35943594

35953595
static 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

Comments
 (0)