File tree 1 file changed +9
-4
lines changed
src/test/codegen/unwind-abis
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 6
6
#![ crate_type = "lib" ]
7
7
#![ feature( c_unwind) ]
8
8
9
- extern "C-unwind" {
10
- fn may_unwind ( ) ;
11
- }
12
-
13
9
// CHECK: @rust_item_that_can_unwind() unnamed_addr #0
14
10
#[ no_mangle]
15
11
pub unsafe extern "C-unwind" fn rust_item_that_can_unwind ( ) {
12
+ // CHECK: call void @_ZN4core9panicking15panic_no_unwind
16
13
may_unwind ( ) ;
17
14
}
18
15
16
+ extern "C-unwind" {
17
+ // CHECK: @may_unwind() unnamed_addr #1
18
+ fn may_unwind ( ) ;
19
+ }
20
+
19
21
// Now, make sure that the LLVM attributes for this functions are correct. First, make
20
22
// sure that the first item is correctly marked with the `nounwind` attribute:
21
23
//
22
24
// 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