mirror of
https://github.com/rust-lang/rust
synced 2024-10-02 14:54:35 +00:00
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 a new issue