mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
UnwindAction::Terminate edge is also critical edge
This commit is contained in:
parent
04126398c2
commit
1499a6faad
@ -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…
Reference in New Issue
Block a user