Skip to content

Commit a315bb4

Browse files
committed
Expand c-unwind-abi-panic-abort test
1 parent c586bc3 commit a315bb4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@
66
#![crate_type = "lib"]
77
#![feature(c_unwind)]
88

9-
extern "C-unwind" {
10-
fn may_unwind();
11-
}
12-
139
// CHECK: @rust_item_that_can_unwind() unnamed_addr #0
1410
#[no_mangle]
1511
pub unsafe extern "C-unwind" fn rust_item_that_can_unwind() {
12+
// CHECK: call void @_ZN4core9panicking15panic_no_unwind
1613
may_unwind();
1714
}
1815

16+
extern "C-unwind" {
17+
// CHECK: @may_unwind() unnamed_addr #1
18+
fn may_unwind();
19+
}
20+
1921
// Now, make sure that the LLVM attributes for this functions are correct. First, make
2022
// sure that the first item is correctly marked with the `nounwind` attribute:
2123
//
2224
// CHECK: attributes #0 = { {{.*}}nounwind{{.*}} }
25+
//
26+
// Now, check that foreign item is correctly marked without the `nounwind` attribute.
27+
// CHECK-NOT: attributes #1 = { {{.*}}nounwind{{.*}} }

0 commit comments

Comments
 (0)