File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/test/codegen/unwind-abis Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 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]
1511pub 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{{.*}} }
You can’t perform that action at this time.
0 commit comments