@@ -33,37 +33,37 @@ llvm::cl::opt<bool> DisableConvertEscapeToNoEscapeSwitchEnumPeephole(
33
33
34
34
using namespace swift ;
35
35
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 );
44
44
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 ;
47
47
48
- auto *Succ = SuccSome ->getSingleSuccessorBlock ();
49
- if (!Succ )
50
- return nullptr ;
48
+ auto *succ = succSome ->getSingleSuccessorBlock ();
49
+ if (!succ )
50
+ return nullptr ;
51
51
52
- if (SuccNone == Succ )
53
- return Succ ;
52
+ if (succNone == succ )
53
+ return succ ;
54
54
55
- SuccNone = SuccNone ->getSingleSuccessorBlock ();
56
- if (SuccNone == Succ )
57
- return Succ ;
55
+ succNone = succNone ->getSingleSuccessorBlock ();
56
+ if (succNone == succ )
57
+ return succ ;
58
58
59
- if (SuccNone == nullptr )
60
- return nullptr ;
59
+ if (succNone == nullptr )
60
+ return nullptr ;
61
61
62
- SuccNone = SuccNone ->getSingleSuccessorBlock ();
63
- if (SuccNone == Succ )
64
- return Succ ;
62
+ succNone = succNone ->getSingleSuccessorBlock ();
63
+ if (succNone == succ )
64
+ return succ ;
65
65
66
- return nullptr ;
66
+ return nullptr ;
67
67
}
68
68
69
69
// / Find a safe insertion point for closure destruction. We might create a
0 commit comments