UnwindAction::Terminate edge is also critical edge
This commit is contained in:
parent
04126398c2
commit
1499a6faad
@ -53,7 +53,8 @@ pub fn add_call_guards(&self, body: &mut Body<'_>) {
|
||||
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…
Reference in New Issue
Block a user