mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "[SILOptimizer] Don't diagnose infinite recursion if a branch terminates (#19724)"
This reverts commit e94450e840.
rdar://45080912
This commit is contained in:
@@ -1061,30 +1061,6 @@ bool TermInst::isFunctionExiting() const {
|
||||
llvm_unreachable("Unhandled TermKind in switch.");
|
||||
}
|
||||
|
||||
bool TermInst::isProgramTerminating() const {
|
||||
switch (getTermKind()) {
|
||||
case TermKind::BranchInst:
|
||||
case TermKind::CondBranchInst:
|
||||
case TermKind::SwitchValueInst:
|
||||
case TermKind::SwitchEnumInst:
|
||||
case TermKind::SwitchEnumAddrInst:
|
||||
case TermKind::DynamicMethodBranchInst:
|
||||
case TermKind::CheckedCastBranchInst:
|
||||
case TermKind::CheckedCastValueBranchInst:
|
||||
case TermKind::CheckedCastAddrBranchInst:
|
||||
case TermKind::TryApplyInst:
|
||||
case TermKind::YieldInst:
|
||||
case TermKind::ReturnInst:
|
||||
case TermKind::ThrowInst:
|
||||
case TermKind::UnwindInst:
|
||||
return false;
|
||||
case TermKind::UnreachableInst:
|
||||
return true;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled TermKind in switch.");
|
||||
}
|
||||
|
||||
TermInst::SuccessorBlockArgumentsListTy
|
||||
TermInst::getSuccessorBlockArguments() const {
|
||||
function_ref<PhiArgumentArrayRef(const SILSuccessor &)> op;
|
||||
|
||||
Reference in New Issue
Block a user