brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 44788c7 Raw
74 lines · plain
1; RUN: split-file --leading-lines %s %t2; RUN: not llvm-as < %t/missing-lparen.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-LPAREN3; RUN: not llvm-as < %t/missing-rparen.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-RPAREN4; RUN: not llvm-as < %t/missing-rparen-none.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-RPAREN-NONE5; RUN: not llvm-as < %t/missing-colon.ll 2>&1 | FileCheck %s --check-prefix=CHECK-MISSING-COLON6; RUN: not llvm-as < %t/invalid-component.ll 2>&1 | FileCheck %s --check-prefix=CHECK-INVALID-COMPONENT7; RUN: not llvm-as < %t/duplicate-ret.ll 2>&1 | FileCheck %s --check-prefix=CHECK-DUPLICATE-RET8; RUN: not llvm-as < %t/none-after.ll 2>&1 | FileCheck %s --check-prefix=CHECK-NONE-AFTER9; RUN: not llvm-as < %t/none-before.ll 2>&1 | FileCheck %s --check-prefix=CHECK-NONE-BEFORE10; RUN: not opt -disable-output < %t/non-pointer-type.ll 2>&1 | FileCheck %s --check-prefix=CHECK-NON-POINTER-TYPE11 12;--- missing-lparen.ll13 14; CHECK-MISSING-LPAREN: <stdin>:[[@LINE+1]]:32: error: expected '('15define void @test(ptr captures %p) {16  ret void17}18 19;--- missing-rparen.ll20 21; CHECK-MISSING-RPAREN: <stdin>:[[@LINE+1]]:40: error: expected ',' or ')'22define void @test(ptr captures(address %p) {23  ret void24}25 26;--- missing-rparen-none.ll27 28; CHECK-MISSING-RPAREN-NONE: <stdin>:[[@LINE+1]]:37: error: expected ',' or ')'29define void @test(ptr captures(none %p) {30  ret void31}32 33;--- missing-colon.ll34 35; CHECK-MISSING-COLON: <stdin>:[[@LINE+1]]:36: error: expected ':'36define void @test(ptr captures(ret address) %p) {37  ret void38}39 40;--- invalid-component.ll41 42; CHECK-INVALID-COMPONENT: <stdin>:[[@LINE+1]]:32: error: expected one of 'none', 'address', 'address_is_null', 'provenance' or 'read_provenance'43define void @test(ptr captures(foo) %p) {44  ret void45}46 47;--- duplicate-ret.ll48 49; CHECK-DUPLICATE-RET: <stdin>:[[@LINE+1]]:51: error: duplicate 'ret' location50define void @test(ptr captures(ret: address, ret: provenance) %p) {51  ret void52}53 54;--- none-after.ll55 56; CHECK-NONE-AFTER: <stdin>:[[@LINE+1]]:45: error: cannot use 'none' with other component57define void @test(ptr captures(address, none) %p) {58  ret void59}60 61;--- none-before.ll62 63; CHECK-NONE-BEFORE: <stdin>:[[@LINE+1]]:38: error: cannot use 'none' with other component64define void @test(ptr captures(none, address) %p) {65  ret void66}67 68;--- non-pointer-type.ll69 70; CHECK-NON-POINTER-TYPE: Attribute 'captures(none)' applied to incompatible type!71define void @test(i32 captures(none) %p) {72  ret void73}74