Skip to content

Commit fc4fe97

Browse files
committed
Memory management bug fix here for indirect nested enums.
1 parent a7ee8ba commit fc4fe97

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/SILGen/SILGenPattern.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,8 +2275,7 @@ void SILGenFunction::emitSwitchStmt(SwitchStmt *S) {
22752275

22762276
for (auto cmv : argArray) {
22772277
if (cmv.getValue() == value) {
2278-
if (cmv.hasCleanup())
2279-
B.createRetainValue(CurrentSILLoc, value, Atomicity::Atomic);
2278+
B.createRetainValue(CurrentSILLoc, value, Atomicity::Atomic);
22802279
break;
22812280
}
22822281
}

0 commit comments

Comments
 (0)