Revert "[SILOptimizer] Don't diagnose infinite recursion if a branch terminates (#19724)"

This reverts commit e94450e840.

rdar://45080912
This commit is contained in:
Graydon Hoare
2018-10-07 23:54:17 -07:00
parent 08acbf33de
commit cc16ddfd13
18 changed files with 104 additions and 183 deletions

View File

@@ -3515,7 +3515,7 @@ bool SimplifyCFG::simplifyProgramTerminationBlock(SILBasicBlock *BB) {
// use the analysis is because the CFG is likely to be invalidated right
// after this pass, o we do not really get the benefit of reusing the
// computation for the next iteration of the pass.
if (!BB->isProgramTerminationPoint())
if (!isARCInertTrapBB(BB))
return false;
// This is going to be the last basic block this program is going to execute