Skip to content

Commit c55c0f8

Browse files
committed
[gardening] Eliminate two else returns.
1 parent 503774e commit c55c0f8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lib/SILOptimizer/Mandatory/MandatoryInlining.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,23 @@ cleanupCalleeValue(SILValue CalleeValue, ArrayRef<SILValue> CaptureArgs,
133133
for (Operand *ABIUse : ABI->getUses()) {
134134
if (SRI == nullptr && isa<StrongReleaseInst>(ABIUse->getUser())) {
135135
SRI = cast<StrongReleaseInst>(ABIUse->getUser());
136-
} else if (ABIUse->getUser() != PBI)
137-
return;
136+
continue;
137+
}
138+
139+
if (ABIUse->getUser() == PBI)
140+
continue;
141+
142+
return;
138143
}
144+
139145
StoreInst *SI = nullptr;
140146
for (Operand *PBIUse : PBI->getUses()) {
141147
if (SI == nullptr && isa<StoreInst>(PBIUse->getUser())) {
142148
SI = cast<StoreInst>(PBIUse->getUser());
143-
} else
144-
return;
149+
continue;
150+
}
151+
152+
return;
145153
}
146154

147155
// If we found a store, record its source and erase it.

0 commit comments

Comments
 (0)