Skip to content

Commit 60d2a93

Browse files
committed
[NFC] result -> inner, for consistency
1 parent c1f110c commit 60d2a93

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/SILGen/SILGenPoly.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,60 +1826,60 @@ class TranslateArguments : public ExpanderBase<TranslateArguments> {
18261826
AbstractionPattern outerOrigType,
18271827
CanType outerSubstType,
18281828
ManagedValue outer,
1829-
SILParameterInfo result) {
1830-
auto resultTy = SGF.getSILType(result, InnerTypesFuncTy);
1829+
SILParameterInfo innerParam) {
1830+
auto innerTy = SGF.getSILType(innerParam, InnerTypesFuncTy);
18311831

18321832
return processSingle(innerOrigType, innerSubstType,
18331833
outerOrigType, outerSubstType,
1834-
outer, resultTy, result.getConvention());
1834+
outer, innerTy, innerParam.getConvention());
18351835
}
18361836

18371837
ManagedValue processSingle(AbstractionPattern innerOrigType,
18381838
CanType innerSubstType,
18391839
AbstractionPattern outerOrigType,
18401840
CanType outerSubstType,
18411841
ManagedValue outer,
1842-
SILType resultTy,
1843-
ParameterConvention resultConvention) {
1842+
SILType innerTy,
1843+
ParameterConvention innerConvention) {
18441844
// Easy case: we want to pass exactly this value.
1845-
if (outer.getType() == resultTy) {
1846-
if (isConsumedParameter(resultConvention) && !outer.isPlusOne(SGF)) {
1845+
if (outer.getType() == innerTy) {
1846+
if (isConsumedParameter(innerConvention) && !outer.isPlusOne(SGF)) {
18471847
outer = outer.copyUnmanaged(SGF, Loc);
18481848
}
18491849

18501850
return outer;
18511851
}
18521852

1853-
switch (resultConvention) {
1853+
switch (innerConvention) {
18541854
// Direct translation is relatively easy.
18551855
case ParameterConvention::Direct_Owned:
18561856
case ParameterConvention::Direct_Unowned:
18571857
return processIntoOwned(innerOrigType, innerSubstType,
18581858
outerOrigType, outerSubstType,
1859-
outer, resultTy);
1859+
outer, innerTy);
18601860
case ParameterConvention::Direct_Guaranteed:
18611861
return processIntoGuaranteed(innerOrigType, innerSubstType,
18621862
outerOrigType, outerSubstType,
1863-
outer, resultTy);
1863+
outer, innerTy);
18641864
case ParameterConvention::Indirect_In: {
18651865
if (SGF.silConv.useLoweredAddresses()) {
18661866
return processIndirect(innerOrigType, innerSubstType,
18671867
outerOrigType, outerSubstType,
1868-
outer, resultTy);
1868+
outer, innerTy);
18691869
}
18701870
return processIntoOwned(innerOrigType, innerSubstType,
18711871
outerOrigType, outerSubstType,
1872-
outer, resultTy);
1872+
outer, innerTy);
18731873
}
18741874
case ParameterConvention::Indirect_In_Guaranteed: {
18751875
if (SGF.silConv.useLoweredAddresses()) {
18761876
return processIndirect(innerOrigType, innerSubstType,
18771877
outerOrigType, outerSubstType,
1878-
outer, resultTy);
1878+
outer, innerTy);
18791879
}
18801880
return processIntoGuaranteed(innerOrigType, innerSubstType,
18811881
outerOrigType, outerSubstType,
1882-
outer, resultTy);
1882+
outer, innerTy);
18831883
}
18841884
case ParameterConvention::Pack_Guaranteed:
18851885
case ParameterConvention::Pack_Owned:

0 commit comments

Comments
 (0)