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

Side by Side Diff: test/NaCl/PNaClABI/global-attributes.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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/function-signatures.ll ('k') | test/NaCl/PNaClABI/instcombine.ll » ('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
3 ; Global variable attributes
4
5 ; CHECK: Variable var_with_section has disallowed "section" attribute
6 @var_with_section = internal global [1 x i8] zeroinitializer, section ".some_sec tion"
7
8 ; PNaCl programs can depend on data alignments in general, so we allow
9 ; "align" on global variables.
10 ; CHECK-NOT: var_with_alignment
11 @var_with_alignment = internal global [4 x i8] zeroinitializer, align 8
12
13 ; TLS variables must be expanded out by ExpandTls.
14 ; CHECK-NEXT: Variable tls_var has disallowed "thread_local" attribute
15 @tls_var = internal thread_local global [4 x i8] zeroinitializer
16
17 ; CHECK-NEXT: Variable var_with_unnamed_addr has disallowed "unnamed_addr" attri bute
18 @var_with_unnamed_addr = internal unnamed_addr constant [1 x i8] c"x"
19
20 ; CHECK-NEXT: Variable var_ext_init has disallowed "externally_initialized" attr ibute
21 @var_ext_init = internal externally_initialized global [1 x i8] c"x"
22
23
24 ; Function attributes
25
26 ; CHECK-NEXT: Function func_with_attrs has disallowed attributes: noreturn nounw ind
27 define internal void @func_with_attrs() noreturn nounwind {
28 ret void
29 }
30
31 ; CHECK-NEXT: Function func_with_arg_attrs has disallowed attributes: inreg zero ext
32 define internal void @func_with_arg_attrs(i32 inreg zeroext) {
33 ret void
34 }
35
36 ; CHECK-NEXT: Function func_with_callingconv has disallowed calling convention: fastcc (8)
37 define internal fastcc void @func_with_callingconv() {
38 ret void
39 }
40
41 ; CHECK-NEXT: Function func_with_section has disallowed "section" attribute
42 define internal void @func_with_section() section ".some_section" {
43 ret void
44 }
45
46 ; CHECK-NEXT: Function func_with_alignment has disallowed "align" attribute
47 define internal void @func_with_alignment() align 1 {
48 ret void
49 }
50
51 ; CHECK-NEXT: Function func_with_gc has disallowed "gc" attribute
52 define internal void @func_with_gc() gc "my_gc_func" {
53 ret void
54 }
55
56 ; CHECK-NEXT: Function func_with_unnamed_addr has disallowed "unnamed_addr" attr ibute
57 define internal void @func_with_unnamed_addr() unnamed_addr {
58 ret void
59 }
60
61 ; CHECK-NOT: disallowed
62 ; If another check is added, there should be a check-not in between each check
63
64
65 ; This stops the verifier from complaining about the lack of an entry point.
66 define void @_start(i32 %arg) {
67 ret void
68 }
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/function-signatures.ll ('k') | test/NaCl/PNaClABI/instcombine.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698