OLD | NEW |
1 ; RUN: not pnacl-abicheck < %s | FileCheck %s | 1 ; RUN: not pnacl-abicheck < %s | FileCheck %s |
2 ; Test linkage types allowed by PNaCl ABI | 2 ; Test linkage types allowed by PNaCl ABI |
3 | 3 |
4 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64
:64:64-p:32:32:32-v128:32:32" | 4 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64
:64:64-p:32:32:32-v128:32:32" |
5 target triple = "le32-unknown-nacl" | 5 target triple = "le32-unknown-nacl" |
6 | 6 |
7 | 7 |
8 @gv_internal = internal global [1 x i8] c"x" | 8 @gv_internal = internal global [1 x i8] c"x" |
9 ; CHECK-NOT: disallowed | 9 ; CHECK-NOT: disallowed |
10 | 10 |
11 @gv_private = private global [1 x i8] c"x" | 11 @gv_private = private global [1 x i8] c"x" |
12 ; CHECK: Variable gv_private has disallowed linkage type: private | 12 ; CHECK: Variable gv_private has disallowed linkage type: private |
13 @gv_linker_private = linker_private global [1 x i8] c"x" | |
14 ; linker_private is deprecated and treated as private. | |
15 ; CHECK: Variable gv_linker_private has disallowed linkage type: private | |
16 @gv_linker_private_weak = linker_private_weak global [1 x i8] c"x" | |
17 ; linker_private_weak is deprecated and treated as private. | |
18 ; CHECK: gv_linker_private_weak has disallowed linkage type: private | |
19 @gv_linkonce = linkonce global [1 x i8] c"x" | 13 @gv_linkonce = linkonce global [1 x i8] c"x" |
20 ; CHECK: gv_linkonce has disallowed linkage type: linkonce | 14 ; CHECK: gv_linkonce has disallowed linkage type: linkonce |
21 @gv_linkonce_odr = linkonce_odr global [1 x i8] c"x" | 15 @gv_linkonce_odr = linkonce_odr global [1 x i8] c"x" |
22 ; CHECK: gv_linkonce_odr has disallowed linkage type: linkonce_odr | 16 ; CHECK: gv_linkonce_odr has disallowed linkage type: linkonce_odr |
23 @gv_weak = weak global [1 x i8] c"x" | 17 @gv_weak = weak global [1 x i8] c"x" |
24 ; CHECK: gv_weak has disallowed linkage type: weak | 18 ; CHECK: gv_weak has disallowed linkage type: weak |
25 @gv_weak_odr = weak_odr global [1 x i8] c"x" | 19 @gv_weak_odr = weak_odr global [1 x i8] c"x" |
26 ; CHECK: gv_weak_odr has disallowed linkage type: weak_odr | 20 ; CHECK: gv_weak_odr has disallowed linkage type: weak_odr |
27 @gv_common = common global [1 x i8] c"x" | 21 @gv_common = common global [1 x i8] c"x" |
28 ; CHECK: gv_common has disallowed linkage type: common | 22 ; CHECK: gv_common has disallowed linkage type: common |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ret void | 69 ret void |
76 } | 70 } |
77 ; CHECK-NEXT: Function extern_weak_func is declared but not defined (disallowed) | 71 ; CHECK-NEXT: Function extern_weak_func is declared but not defined (disallowed) |
78 ; CHECK-NEXT: Function extern_weak_func has disallowed linkage type: extern_weak | 72 ; CHECK-NEXT: Function extern_weak_func has disallowed linkage type: extern_weak |
79 declare extern_weak void @extern_weak_func() | 73 declare extern_weak void @extern_weak_func() |
80 | 74 |
81 ; CHECK-NEXT: Function avail_ext_func has disallowed linkage type: available_ext
ernally | 75 ; CHECK-NEXT: Function avail_ext_func has disallowed linkage type: available_ext
ernally |
82 define available_externally void @avail_ext_func() { | 76 define available_externally void @avail_ext_func() { |
83 ret void | 77 ret void |
84 } | 78 } |
OLD | NEW |