]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | // compile-flags: -C panic=abort -C opt-level=0 |
2 | ||
3 | // Test that `nounwind` atributes are applied to `C-unwind` extern functions when the | |
4 | // code is compiled with `panic=abort`. We disable optimizations above to prevent LLVM from | |
5 | // inferring the attribute. | |
6 | ||
7 | #![crate_type = "lib"] | |
8 | #![feature(c_unwind)] | |
9 | ||
10 | // CHECK: @rust_item_that_can_unwind() unnamed_addr #0 { | |
11 | #[no_mangle] | |
12 | pub extern "C-unwind" fn rust_item_that_can_unwind() { | |
13 | } | |
14 | ||
15 | // Now, make sure that the LLVM attributes for this functions are correct. First, make | |
16 | // sure that the first item is correctly marked with the `nounwind` attribute: | |
17 | // | |
18 | // CHECK: attributes #0 = { {{.*}}nounwind{{.*}} } |