1 ; RUN: split-file --leading-lines %s %t
2 ; RUN: not llvm-as < %t/missing-lparen.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-LPAREN
3 ; RUN: not llvm-as < %t/missing-rparen.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-RPAREN
4 ; RUN: not llvm-as < %t/missing-rparen-none.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-RPAREN-NONE
5 ; RUN: not llvm-as < %t/missing-colon.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-COLON
6 ; RUN: not llvm-as < %t/invalid-component.ll 2>&1 | FileCheck %s --check-prefix=CHECK-INVALID-COMPONENT
7 ; RUN: not llvm-as < %t/duplicate-ret.ll 2>&1 | FileCheck %s --check-prefix=CHECK-DUPLICATE-RET
8 ; RUN: not llvm-as < %t/none-after.ll 2>&1 | FileCheck %s --check-prefix=CHECK-NONE-AFTER
9 ; RUN: not llvm-as < %t/none-before.ll 2>&1 | FileCheck %s --check-prefix=CHECK-NONE-BEFORE
10 ; RUN: not opt -disable-output < %t/non-pointer-type.ll 2>&1 | FileCheck %s --check-prefix=CHECK-NON-POINTER-TYPE
12 ;--- missing-lparen.ll
14 ; CHECK-MISSING-LPAREN: <stdin>:[[@LINE+1]]:32: error: expected '('
15 define void @test(ptr captures %p) {
19 ;--- missing-rparen.ll
21 ; CHECK-MISSING-RPAREN: <stdin>:[[@LINE+1]]:40: error: expected ',' or ')'
22 define void @test(ptr captures(address %p) {
26 ;--- missing-rparen-none.ll
28 ; CHECK-MISSING-RPAREN-NONE: <stdin>:[[@LINE+1]]:37: error: expected ',' or ')'
29 define void @test(ptr captures(none %p) {
35 ; CHECK-MISSING-COLON: <stdin>:[[@LINE+1]]:36: error: expected ':'
36 define void @test(ptr captures(ret address) %p) {
40 ;--- invalid-component.ll
42 ; CHECK-INVALID-COMPONENT: <stdin>:[[@LINE+1]]:32: error: expected one of 'none', 'address', 'address_is_null', 'provenance' or 'read_provenance'
43 define void @test(ptr captures(foo) %p) {
49 ; CHECK-DUPLICATE-RET: <stdin>:[[@LINE+1]]:51: error: duplicate 'ret' location
50 define void @test(ptr captures(ret: address, ret: provenance) %p) {
56 ; CHECK-NONE-AFTER: <stdin>:[[@LINE+1]]:45: error: cannot use 'none' with other component
57 define void @test(ptr captures(address, none) %p) {
63 ; CHECK-NONE-BEFORE: <stdin>:[[@LINE+1]]:38: error: cannot use 'none' with other component
64 define void @test(ptr captures(none, address) %p) {
68 ;--- non-pointer-type.ll
70 ; CHECK-NON-POINTER-TYPE: Attribute 'captures(none)' applied to incompatible type!
71 define void @test(i32 captures(none) %p) {