Skip to content

Commit 6500e76

Browse files
authored
Merge pull request swiftlang#12399 from CodaFi/no-self-respecting-enum-element
[NFC] Remove dead code in EnumElement construction
2 parents e5c4d16 + 053164b commit 6500e76

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lib/SILGen/SILGenApply.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4277,20 +4277,6 @@ CallEmission::applyEnumElementConstructor(unsigned uncurryLevel, SGFContext C) {
42774277
auto substFnType =
42784278
SGF.getSILFunctionType(origFormalType, firstLevelResult.formalType);
42794279

4280-
// Now that we know the substFnType, check if we assumed that we were
4281-
// passing self at +0. If we did and self is not actually passed at +0,
4282-
// retain Self.
4283-
if (assumedPlusZeroSelf) {
4284-
// If the final emitted function does not have a self param or it does
4285-
// have a self param that is consumed, convert what we think is self
4286-
// to
4287-
// be plus zero.
4288-
if (!substFnType->hasSelfParam() ||
4289-
substFnType->getSelfParameter().isConsumed()) {
4290-
convertSelfToPlusOneFromPlusZero();
4291-
}
4292-
}
4293-
42944280
// We have a fully-applied enum element constructor: open-code the
42954281
// construction.
42964282
EnumElementDecl *element = callee.getEnumElementDecl();

0 commit comments

Comments
 (0)