UnwindAction::Terminate edge is also critical edge
This commit is contained in:
parent
04126398c2
commit
1499a6faad
1 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,8 @@ impl AddCallGuards {
|
|||
kind: TerminatorKind::Call { target: Some(ref mut destination), unwind, .. },
|
||||
source_info,
|
||||
}) if pred_count[*destination] > 1
|
||||
&& (matches!(unwind, UnwindAction::Cleanup(_)) || self == &AllCallEdges) =>
|
||||
&& (matches!(unwind, UnwindAction::Cleanup(_) | UnwindAction::Terminate)
|
||||
|| self == &AllCallEdges) =>
|
||||
{
|
||||
// It's a critical edge, break it
|
||||
let call_guard = BasicBlockData {
|
||||
|
|
Loading…
Add table
Reference in a new issue