[WinEH] Require token linkage in EH pad/ret signatures
[oota-llvm.git] / test / Assembler / invalid-OperatorConstraint.ll
1 ; RUN: sed -e s/.T1:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK1 %s
2 ; RUN: sed -e s/.T2:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK2 %s
3 ; RUN: sed -e s/.T3:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK3 %s
4 ; RUN: sed -e s/.T4:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK4 %s
5 ; RUN: sed -e s/.T5:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK5 %s
6 ; RUN: sed -e s/.T6:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK6 %s
7
8 ;T1: define void @f() {
9 ;T1:   entry:
10 ;T1:     ; operator constraint requires an operator
11 ;T1:     catchret undef to label %entry
12 ;T1:     ; CHECK1: [[@LINE-1]]:15: error: Catchpad value required in this position
13 ;T1: }
14
15 ;T2: define void @f() {
16 ;T2:   entry:
17 ;T2:     %x = cleanuppad []
18 ;T2:     ; catchret's first operand's operator must be catchpad
19 ;T2:     catchret %x to label %entry
20 ;T2:     ; CHECK2: [[@LINE-1]]:15: error: '%x' is not a catchpad
21 ;T2: }
22
23 ;T3: define void @f() {
24 ;T3:   entry:
25 ;T3:     ; catchret's first operand's operator must be catchpad
26 ;T3:     ; (forward reference case)
27 ;T3:     catchret %x to label %next
28 ;T3:     ; CHECK3: [[@LINE-1]]:15: error: '%x' is not a catchpad
29 ;T3:   next:
30 ;T3:     %x = cleanuppad []
31 ;T3:     ret void
32 ;T3: }
33
34 ;T4: define void @f() {
35 ;T4:   entry:
36 ;T4:     ; operator constraint requires an operator
37 ;T4:     cleanupret undef unwind label %entry
38 ;T4:     ; CHECK4: [[@LINE-1]]:17: error: Cleanuppad value required in this position
39 ;T4: }
40
41 ;T5: define void @f() {
42 ;T5:   entry:
43 ;T5:     %x = catchpad []
44 ;T5:             to label %next unwind label %entry
45 ;T5:   next:
46 ;T5:     ; cleanupret first operand's operator must be cleanuppad
47 ;T5:     cleanupret %x unwind to caller
48 ;T5:     ; CHECK5: [[@LINE-1]]:17: error: '%x' is not a cleanuppad
49 ;T5: }
50
51 ;T6: define void @f() {
52 ;T6:   entry:
53 ;T6:     ; cleanupret's first operand's operator must be cleanuppad
54 ;T6:     ; (forward reference case)
55 ;T6:     cleanupret %x unwind label %next
56 ;T6:     ; CHECK6: [[@LINE-1]]:17: error: '%x' is not a cleanuppad
57 ;T6:   next:
58 ;T6:     %x = catchpad [] to label %entry unwind label %next
59 ;T6: }