]> git.proxmox.com Git - rustc.git/blame - src/test/codegen/unwind-extern-imports.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / codegen / unwind-extern-imports.rs
CommitLineData
e74abb32
XL
1// compile-flags: -C no-prepopulate-passes
2// ignore-wasm32-bare compiled with panic=abort by default
3
4#![crate_type = "lib"]
94222f64 5#![feature(c_unwind)]
e74abb32 6
5869c6ff 7extern "C" {
94222f64
XL
8 // CHECK: Function Attrs:{{.*}}nounwind
9 // CHECK-NEXT: declare{{.*}}void @extern_fn
e74abb32 10 fn extern_fn();
e74abb32
XL
11}
12
94222f64
XL
13extern "C-unwind" {
14 // CHECK-NOT: nounwind
15 // CHECK: declare{{.*}}void @c_unwind_extern_fn
16 fn c_unwind_extern_fn();
e74abb32
XL
17}
18
19pub unsafe fn force_declare() {
20 extern_fn();
94222f64 21 c_unwind_extern_fn();
e74abb32 22}