xref: /llvm-project/llvm/test/Assembler/initializes-attribute-invalid.ll (revision 5ece35df8586d0cb8c104a9f44eaae771de025f5)
1; RUN: split-file %s %t
2; RUN: not llvm-as < %s %t/outer_left_parenthesis.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=OUTER-LEFT
3; RUN: not llvm-as < %s %t/inner_left_parenthesis.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=INNER-LEFT
4; RUN: not llvm-as < %s %t/inner_right_parenthesis.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=INNER-RIGHT
5; RUN: not llvm-as < %s %t/outer_right_parenthesis.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=OUTER-RIGHT
6; RUN: not llvm-as < %s %t/integer.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=INTEGER
7; RUN: not llvm-as < %s %t/lower_equal_upper.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=LOWER-EQUAL-UPPER
8; RUN: not llvm-as < %s %t/inner_comma.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=INNER-COMMA
9; RUN: not llvm-as < %s %t/outer_comma.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=OUTER-COMMA
10; RUN: not llvm-as < %s %t/empty1.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=EMPTY1
11; RUN: not llvm-as < %s %t/empty2.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=EMPTY2
12
13;--- outer_left_parenthesis.ll
14; OUTER-LEFT: expected '('
15define void @foo(ptr initializes 0, 4 %a) {
16  ret void
17}
18
19;--- inner_left_parenthesis.ll
20; INNER-LEFT: expected '('
21define void @foo(ptr initializes(0, 4 %a) {
22  ret void
23}
24
25;--- inner_right_parenthesis.ll
26; INNER-RIGHT: expected ')'
27define void @foo(ptr initializes((0, 4 %a) {
28  ret void
29}
30
31;--- outer_right_parenthesis.ll
32; OUTER-RIGHT: expected ')'
33define void @foo(ptr initializes((0, 4) %a) {
34  ret void
35}
36
37;--- integer.ll
38; INTEGER: expected integer
39define void @foo(ptr initializes((0.5, 4)) %a) {
40  ret void
41}
42
43;--- lower_equal_upper.ll
44; LOWER-EQUAL-UPPER: the range should not represent the full or empty set!
45define void @foo(ptr initializes((4, 4)) %a) {
46  ret void
47}
48
49;--- inner_comma.ll
50; INNER-COMMA: expected ','
51define void @foo(ptr initializes((0 4)) %a) {
52  ret void
53}
54
55;--- outer_comma.ll
56; OUTER-COMMA: expected ')'
57define void @foo(ptr initializes((0, 4) (8, 12)) %a) {
58  ret void
59}
60
61;--- empty1.ll
62; EMPTY1: expected '('
63define void @foo(ptr initializes() %a) {
64  ret void
65}
66
67;--- empty2.ll
68; EMPTY2: expected integer
69define void @foo(ptr initializes(()) %a) {
70  ret void
71}
72