]>
Commit | Line | Data |
---|---|---|
1 | // compile-flags: -C opt-level=0 | |
2 | // ignore-wasm32-bare compiled with panic=abort by default | |
3 | ||
4 | #![crate_type = "lib"] | |
5 | #![feature(unwind_attributes)] | |
6 | ||
7 | // Make sure these all do *not* get the attribute. | |
8 | // We disable optimizations to prevent LLVM from infering the attribute. | |
9 | // CHECK-NOT: nounwind | |
10 | ||
11 | // "C" ABI | |
12 | // pub extern fn foo() {} // FIXME right now we don't abort-on-panic but add `nounwind` nevertheless | |
13 | #[unwind(allowed)] | |
14 | pub extern fn foo_allowed() {} | |
15 | ||
16 | // "Rust" | |
17 | // (`extern "Rust"` could be removed as all `fn` get it implicitly; we leave it in for clarity.) | |
18 | pub extern "Rust" fn bar() {} | |
19 | #[unwind(allowed)] | |
20 | pub extern "Rust" fn bar_allowed() {} |