xref: /llvm-project/llvm/test/Assembler/memory-attribute-errors.ll (revision e9754f0211076bab34e5a070cb8eb392a21c0540)
1; RUN: split-file %s %t
2; RUN: not llvm-as < %t/missing-args.ll 2>&1 | FileCheck %s --check-prefix=MISSING-ARGS
3; RUN: not llvm-as < %t/empty.ll 2>&1 | FileCheck %s --check-prefix=EMPTY
4; RUN: not llvm-as < %t/unterminated.ll 2>&1 | FileCheck %s --check-prefix=UNTERMINATED
5; RUN: not llvm-as < %t/invalid-kind.ll 2>&1 | FileCheck %s --check-prefix=INVALID-KIND
6; RUN: not llvm-as < %t/other.ll 2>&1 | FileCheck %s --check-prefix=OTHER
7; RUN: not llvm-as < %t/missing-colon.ll 2>&1 | FileCheck %s --check-prefix=MISSING-COLON
8; RUN: not llvm-as < %t/invalid-access-kind.ll 2>&1 | FileCheck %s --check-prefix=INVALID-ACCESS-KIND
9; RUN: not llvm-as < %t/default-after-loc.ll 2>&1 | FileCheck %s --check-prefix=DEFAULT-AFTER-LOC
10
11;--- missing-args.ll
12; MISSING-ARGS: error: expected '('
13declare void @fn() memory
14;--- empty.ll
15; EMPTY: error: expected memory location (argmem, inaccessiblemem) or access kind (none, read, write, readwrite)
16declare void @fn() memory()
17;--- unterminated.ll
18; UNTERMINATED: error: unterminated memory attribute
19declare void @fn() memory(read
20;--- invalid-kind.ll
21; INVALID-KIND: error: expected memory location (argmem, inaccessiblemem) or access kind (none, read, write, readwrite)
22declare void @fn() memory(foo)
23;--- other.ll
24; OTHER: error: expected memory location (argmem, inaccessiblemem) or access kind (none, read, write, readwrite)
25declare void @fn() memory(other: read)
26;--- missing-colon.ll
27; MISSING-COLON: error: expected ':' after location
28declare void @fn() memory(argmem)
29;--- invalid-access-kind.ll
30; INVALID-ACCESS-KIND: error: expected access kind (none, read, write, readwrite)
31declare void @fn() memory(argmem: foo)
32;--- default-after-loc.ll
33; DEFAULT-AFTER-LOC: error: default access kind must be specified first
34declare void @fn() memory(argmem: read, write)
35