Skip to content

Commit 0c3c62b

Browse files
committed
[NFC] Rename isPackExpansion -> isOrigPackExpansion for clarity
1 parent c032cc5 commit 0c3c62b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

include/swift/SIL/AbstractionPatternGenerators.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class FunctionParamGenerator {
5151
unsigned substParamIndex = 0;
5252

5353
/// The number of subst parameters corresponding to the current
54-
/// subst parameter.
54+
/// orig parameter.
5555
unsigned numSubstParamsForOrigParam;
5656

5757
/// Whether the orig function type is opaque, i.e. does not permit us to
@@ -125,7 +125,7 @@ class FunctionParamGenerator {
125125
}
126126

127127
/// Return whether the current orig parameter type is a pack expansion.
128-
bool isPackExpansion() const {
128+
bool isOrigPackExpansion() const {
129129
assert(!isFinished());
130130
return origParamIsExpansion;
131131
}

lib/SIL/IR/AbstractionPattern.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,7 @@ class SubstFunctionTypePatternVisitor
22362236

22372237
pattern.forEachFunctionParam(func.getParams(), /*ignore self*/ false,
22382238
[&](FunctionParamGenerator &param) {
2239-
if (!param.isPackExpansion()) {
2239+
if (!param.isOrigPackExpansion()) {
22402240
auto newParamTy = visit(param.getSubstParams()[0].getParameterType(),
22412241
param.getOrigType());
22422242
addParam(param.getOrigFlags(), newParamTy);

lib/SIL/IR/SILFunctionType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ class DestructureInputs {
15761576
// If the parameter is not a pack expansion, just pull off the
15771577
// next parameter and destructure it in parallel with the abstraction
15781578
// pattern for the type.
1579-
if (!param.isPackExpansion()) {
1579+
if (!param.isOrigPackExpansion()) {
15801580
visit(param.getOrigType(), param.getSubstParams()[0],
15811581
/*forSelf*/false);
15821582
return;

lib/SILGen/FunctionInputGenerator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class FunctionInputGenerator {
8989
/// Ready the current orig parameter.
9090
void readyOrigParameter() {
9191
substParamIndex = 0;
92-
if (origParam.isPackExpansion()) {
92+
if (origParam.isOrigPackExpansion()) {
9393
// The pack value exists in the lowered parameters and must be
9494
// claimed whether it contains formal parameters or not.
9595
packValue = inputs.claimNext();
@@ -125,7 +125,7 @@ class FunctionInputGenerator {
125125
}
126126

127127
bool isOrigPackExpansion() const {
128-
return origParam.isPackExpansion();
128+
return origParam.isOrigPackExpansion();
129129
}
130130

131131
AbstractionPattern getOrigType() const {

lib/SILGen/SILGenPoly.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ class TranslateArguments {
10941094
// output type, it corresponds to N formal parameters in the
10951095
// substituted output type. translateToPackParam will pull off
10961096
// N substituted formal parameters from the input type.
1097-
if (outputParams.isPackExpansion()) {
1097+
if (outputParams.isOrigPackExpansion()) {
10981098
auto outputPackParam = claimNextOutputType();
10991099
auto output =
11001100
translateToPackParam(inputParams,

0 commit comments

Comments
 (0)