Skip to content

Commit 0861f7e

Browse files
authored
Merge pull request swiftlang#34508 from slavapestov/fix-silgen-warning
SILGen: Fix an unused variable warning
2 parents fce43da + ffc976d commit 0861f7e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/SILGen/ResultPlan.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,12 +452,9 @@ class TupleInitializationResultPlan final : public ResultPlan {
452452
};
453453

454454
class ForeignAsyncInitializationPlan final : public ResultPlan {
455-
SILGenFunction &SGF;
456455
SILLocation loc;
457456
public:
458-
ForeignAsyncInitializationPlan(SILGenFunction &SGF, SILLocation loc)
459-
: SGF(SGF), loc(loc) {
460-
}
457+
ForeignAsyncInitializationPlan(SILLocation loc) : loc(loc) {}
461458

462459
void
463460
gatherIndirectResultAddrs(SILGenFunction &SGF, SILLocation loc,
@@ -575,7 +572,7 @@ ResultPlanPtr ResultPlanBuilder::buildTopLevelResult(Initialization *init,
575572
// Create a result plan that gets the result schema from the completion
576573
// handler callback's arguments.
577574
// completion handler.
578-
return ResultPlanPtr(new ForeignAsyncInitializationPlan(SGF, loc));
575+
return ResultPlanPtr(new ForeignAsyncInitializationPlan(loc));
579576

580577
} else if (auto foreignError = calleeTypeInfo.foreign.error) {
581578
// Handle the foreign error first.

0 commit comments

Comments
 (0)