Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: test/NaCl/PNaClABI/linkagetypes.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/NaCl/PNaClABI/intrinsics.ll ('k') | test/NaCl/PNaClABI/lit.local.cfg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; RUN: not pnacl-abicheck < %s | FileCheck %s
2 ; Test linkage types allowed by PNaCl ABI
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"
5 target triple = "le32-unknown-nacl"
6
7
8 @gv_internal = internal global [1 x i8] c"x"
9 ; CHECK-NOT: disallowed
10
11 @gv_private = private global [1 x i8] c"x"
12 ; CHECK: Variable gv_private has disallowed linkage type: private
13 @gv_linkonce = linkonce global [1 x i8] c"x"
14 ; CHECK: gv_linkonce has disallowed linkage type: linkonce
15 @gv_linkonce_odr = linkonce_odr global [1 x i8] c"x"
16 ; CHECK: gv_linkonce_odr has disallowed linkage type: linkonce_odr
17 @gv_weak = weak global [1 x i8] c"x"
18 ; CHECK: gv_weak has disallowed linkage type: weak
19 @gv_weak_odr = weak_odr global [1 x i8] c"x"
20 ; CHECK: gv_weak_odr has disallowed linkage type: weak_odr
21 @gv_common = common global [1 x i8] c"x"
22 ; CHECK: gv_common has disallowed linkage type: common
23 @gv_appending = appending global [1 x i8] zeroinitializer
24 ; CHECK: gv_appending has disallowed linkage type: appending
25 @gv_dllimport = external dllimport global [1 x i8]
26 ; CHECK: gv_dllimport is not a valid external symbol (disallowed)
27 @gv_dllexport = dllexport global [1 x i8] c"x"
28 ; CHECK: gv_dllexport is not a valid external symbol (disallowed)
29 @gv_extern_weak = extern_weak global [1 x i8]
30 ; CHECK: gv_extern_weak has disallowed linkage type: extern_weak
31 @gv_available_externally = available_externally global [1 x i8] c"x"
32 ; CHECK: gv_available_externally has disallowed linkage type: available_external ly
33
34
35 ; CHECK-NOT: disallowed
36 ; CHECK-NOT: internal_func
37 ; internal linkage is allowed, and should not appear in error output.
38 define internal void @internal_func() {
39 ret void
40 }
41
42 ; CHECK: Function private_func has disallowed linkage type: private
43 define private void @private_func() {
44 ret void
45 }
46 ; CHECK: Function external_func is declared but not defined (disallowed)
47 declare external void @external_func()
48 ; CHECK: linkonce_func has disallowed linkage type: linkonce
49 define linkonce void @linkonce_func() {
50 ret void
51 }
52 ; CHECK-NEXT: linkonce_odr_func has disallowed linkage type: linkonce_odr
53 define linkonce_odr void @linkonce_odr_func() {
54 ret void
55 }
56 ; CHECK-NEXT: weak_func has disallowed linkage type: weak
57 define weak void @weak_func() {
58 ret void
59 }
60 ; CHECK-NEXT: weak_odr_func has disallowed linkage type: weak_odr
61 define weak_odr void @weak_odr_func() {
62 ret void
63 }
64 ; CHECK-NEXT: dllimport_func is declared but not defined (disallowed)
65 ; CHECK-NEXT: dllimport_func is not a valid external symbol (disallowed)
66 declare dllimport void @dllimport_func()
67 ; CHECK-NEXT: dllexport_func is not a valid external symbol (disallowed)
68 define dllexport void @dllexport_func() {
69 ret void
70 }
71 ; CHECK-NEXT: Function extern_weak_func is declared but not defined (disallowed)
72 ; CHECK-NEXT: Function extern_weak_func has disallowed linkage type: extern_weak
73 declare extern_weak void @extern_weak_func()
74
75 ; CHECK-NEXT: Function avail_ext_func has disallowed linkage type: available_ext ernally
76 define available_externally void @avail_ext_func() {
77 ret void
78 }
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/intrinsics.ll ('k') | test/NaCl/PNaClABI/lit.local.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698