]> git.lizzy.rs Git - rust.git/blob - tests/codegen/unwind-extern-imports.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / unwind-extern-imports.rs
1 // compile-flags: -C no-prepopulate-passes
2 // ignore-wasm32-bare compiled with panic=abort by default
3
4 #![crate_type = "lib"]
5 #![feature(c_unwind)]
6
7 extern "C" {
8     // CHECK: Function Attrs:{{.*}}nounwind
9     // CHECK-NEXT: declare{{.*}}void @extern_fn
10     fn extern_fn();
11 }
12
13 extern "C-unwind" {
14     // CHECK-NOT: nounwind
15     // CHECK: declare{{.*}}void @c_unwind_extern_fn
16     fn c_unwind_extern_fn();
17 }
18
19 pub unsafe fn force_declare() {
20     extern_fn();
21     c_unwind_extern_fn();
22 }