1
Fork 0

Make rust-intrinsic ABI unwindable

Stick `#[rustc_nounwind]` to all except `const_eval_select` to undo the
change for all other intrinsics.
This commit is contained in:
Gary Guo 2023-04-12 13:57:12 +01:00
parent 9be9b5e09a
commit 229b0a0fdc
4 changed files with 236 additions and 3 deletions

View file

@ -1226,10 +1226,11 @@ pub fn fn_can_unwind(tcx: TyCtxt<'_>, fn_def_id: Option<DefId>, abi: SpecAbi) ->
| AvrNonBlockingInterrupt
| CCmseNonSecureCall
| Wasm
| RustIntrinsic
| PlatformIntrinsic
| Unadjusted => false,
Rust | RustCall | RustCold => tcx.sess.panic_strategy() == PanicStrategy::Unwind,
Rust | RustCall | RustCold | RustIntrinsic => {
tcx.sess.panic_strategy() == PanicStrategy::Unwind
}
}
}