Skip to content

Commit caa86c4

Browse files
committed
[gardening] Change a function with 4 space indent => 2 space indent and standardize variable names.
NFC.
1 parent fef48a5 commit caa86c4

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

lib/SILOptimizer/Mandatory/ClosureLifetimeFixup.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,37 @@ llvm::cl::opt<bool> DisableConvertEscapeToNoEscapeSwitchEnumPeephole(
3333

3434
using namespace swift;
3535

36-
static SILBasicBlock *getOptionalDiamondSuccessor(SwitchEnumInst *SEI) {
37-
auto numSuccs = SEI->getNumSuccessors();
38-
if (numSuccs != 2)
39-
return nullptr;
40-
auto *SuccSome = SEI->getCase(0).second;
41-
auto *SuccNone = SEI->getCase(1).second;
42-
if (SuccSome->args_size() != 1)
43-
std::swap(SuccSome, SuccNone);
36+
static SILBasicBlock *getOptionalDiamondSuccessor(SwitchEnumInst *sei) {
37+
auto numSuccs = sei->getNumSuccessors();
38+
if (numSuccs != 2)
39+
return nullptr;
40+
auto *succSome = sei->getCase(0).second;
41+
auto *succNone = sei->getCase(1).second;
42+
if (succSome->args_size() != 1)
43+
std::swap(succSome, succNone);
4444

45-
if (SuccSome->args_size() != 1 || SuccNone->args_size() != 0)
46-
return nullptr;
45+
if (succSome->args_size() != 1 || succNone->args_size() != 0)
46+
return nullptr;
4747

48-
auto *Succ = SuccSome->getSingleSuccessorBlock();
49-
if (!Succ)
50-
return nullptr;
48+
auto *succ = succSome->getSingleSuccessorBlock();
49+
if (!succ)
50+
return nullptr;
5151

52-
if (SuccNone == Succ)
53-
return Succ;
52+
if (succNone == succ)
53+
return succ;
5454

55-
SuccNone = SuccNone->getSingleSuccessorBlock();
56-
if (SuccNone == Succ)
57-
return Succ;
55+
succNone = succNone->getSingleSuccessorBlock();
56+
if (succNone == succ)
57+
return succ;
5858

59-
if (SuccNone == nullptr)
60-
return nullptr;
59+
if (succNone == nullptr)
60+
return nullptr;
6161

62-
SuccNone = SuccNone->getSingleSuccessorBlock();
63-
if (SuccNone == Succ)
64-
return Succ;
62+
succNone = succNone->getSingleSuccessorBlock();
63+
if (succNone == succ)
64+
return succ;
6565

66-
return nullptr;
66+
return nullptr;
6767
}
6868

6969
/// Find a safe insertion point for closure destruction. We might create a

0 commit comments

Comments
 (0)