Mark the panic_no_unwind lang item as nounwind
This commit is contained in:
parent
24ae9960c5
commit
c4f2d21f1a
1 changed files with 7 additions and 0 deletions
|
|
@ -2778,6 +2778,13 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
|
|||
}
|
||||
}
|
||||
|
||||
// The panic_no_unwind function called by TerminatorKind::Abort will never
|
||||
// unwind. If the panic handler that it invokes unwind then it will simply
|
||||
// call the panic handler again.
|
||||
if Some(id) == tcx.lang_items().panic_no_unwind() {
|
||||
codegen_fn_attrs.flags |= CodegenFnAttrFlags::NEVER_UNWIND;
|
||||
}
|
||||
|
||||
let supported_target_features = tcx.supported_target_features(LOCAL_CRATE);
|
||||
|
||||
let mut inline_span = None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue