add panic_fmt_nounwind for panicing without unwinding, and use it for panic_no_unwind
This commit is contained in:
parent
2b50cd1877
commit
66282cb47d
2 changed files with 19 additions and 10 deletions
|
@ -1582,13 +1582,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: DefId) -> CodegenFnAttrs {
|
|||
codegen_fn_attrs.flags |= CodegenFnAttrFlags::TRACK_CALLER;
|
||||
}
|
||||
|
||||
// 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(did.to_def_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