]> git.lizzy.rs Git - rust.git/blob - tests/codegen/unwind-and-panic-abort.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / unwind-and-panic-abort.rs
1 // compile-flags: -C panic=abort
2
3 #![crate_type = "lib"]
4 #![feature(c_unwind)]
5
6 extern "C-unwind" {
7     fn bar();
8 }
9
10 // CHECK: Function Attrs:{{.*}}nounwind
11 // CHECK-NEXT: define{{.*}}void @foo
12 // Handle both legacy and v0 symbol mangling.
13 // CHECK: call void @{{.*core9panicking19panic_cannot_unwind}}
14 #[no_mangle]
15 pub unsafe extern "C" fn foo() {
16     bar();
17 }