Add UnwindAction::Terminate
This commit is contained in:
parent
5e6ed132fa
commit
0a5dac3062
16 changed files with 126 additions and 121 deletions
|
@ -469,7 +469,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
} else {
|
||||
Some(destination_block)
|
||||
},
|
||||
unwind: UnwindAction::Continue,
|
||||
unwind: if options.contains(InlineAsmOptions::MAY_UNWIND) {
|
||||
UnwindAction::Continue
|
||||
} else {
|
||||
UnwindAction::Unreachable
|
||||
},
|
||||
},
|
||||
);
|
||||
if options.contains(InlineAsmOptions::MAY_UNWIND) {
|
||||
|
|
|
@ -369,7 +369,7 @@ impl DropTree {
|
|||
let terminator = TerminatorKind::Drop {
|
||||
target: blocks[drop_data.1].unwrap(),
|
||||
// The caller will handle this if needed.
|
||||
unwind: UnwindAction::Continue,
|
||||
unwind: UnwindAction::Terminate,
|
||||
place: drop_data.0.local.into(),
|
||||
};
|
||||
cfg.terminate(block, drop_data.0.source_info, terminator);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue