]> git.lizzy.rs Git - rust.git/blob - tests/codegen/unwind-extern-exports.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / codegen / unwind-extern-exports.rs
1 // compile-flags: -C opt-level=0
2 // ignore-wasm32-bare compiled with panic=abort by default
3
4 #![crate_type = "lib"]
5 #![feature(c_unwind)]
6
7 // Make sure these all do *not* get the attribute.
8 // We disable optimizations to prevent LLVM from inferring the attribute.
9 // CHECK-NOT: nounwind
10
11 // "C" ABI
12 pub extern "C-unwind" fn foo_unwind() {}
13
14 // "Rust"
15 // (`extern "Rust"` could be removed as all `fn` get it implicitly; we leave it in for clarity.)
16 pub fn bar() {}