Filipe Cabecinhas | de968ec | 2015-01-24 04:15:05 +0000 | [diff] [blame] | 1 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \ |
| 2 | RUN: FileCheck --check-prefix=INVALID-ENCODING %s |
| 3 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \ |
| 4 | RUN: FileCheck --check-prefix=BAD-ABBREV %s |
| 5 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \ |
| 6 | RUN: FileCheck --check-prefix=UNEXPECTED-EOF %s |
| 7 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \ |
| 8 | RUN: FileCheck --check-prefix=BAD-ABBREV-NUMBER %s |
Filipe Cabecinhas | fcd044b | 2015-01-30 18:13:50 +0000 | [diff] [blame] | 9 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-type-table-forward-ref.bc 2>&1 | \ |
| 10 | RUN: FileCheck --check-prefix=BAD-TYPE-TABLE-FORWARD-REF %s |
| 11 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-bitwidth.bc 2>&1 | \ |
| 12 | RUN: FileCheck --check-prefix=BAD-BITWIDTH %s |
JF Bastien | 30bf96b | 2015-02-22 19:32:03 +0000 | [diff] [blame] | 13 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc 2>&1 | \ |
| 14 | RUN: FileCheck --check-prefix=BAD-ALIGN %s |
David Blaikie | 675e8cb | 2015-03-16 21:35:48 +0000 | [diff] [blame] | 15 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-mismatched-explicit-type.bc 2>&1 | \ |
| 16 | RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP %s |
David Blaikie | c695cc7 | 2015-03-16 21:48:46 +0000 | [diff] [blame] | 17 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-mismatched-explicit-type.bc 2>&1 | \ |
| 18 | RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-LOAD %s |
David Blaikie | 12cf5d70 | 2015-03-16 22:03:50 +0000 | [diff] [blame] | 19 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-operator-mismatched-explicit-type.bc 2>&1 | \ |
| 20 | RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP-OPERATOR %s |
David Blaikie | dbe6e0f | 2015-04-17 06:40:14 +0000 | [diff] [blame] | 21 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-mismatched-explicit-type.bc 2>&1 | \ |
| 22 | RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-CALL %s |
| 23 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-non-function-explicit-type.bc 2>&1 | \ |
| 24 | RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-CALL %s |
David Blaikie | 5ea1f7b | 2015-04-24 18:06:06 +0000 | [diff] [blame] | 25 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-mismatched-explicit-type.bc 2>&1 | \ |
| 26 | RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-INVOKE %s |
| 27 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-non-function-explicit-type.bc 2>&1 | \ |
| 28 | RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-INVOKE %s |
Filipe Cabecinhas | de968ec | 2015-01-24 04:15:05 +0000 | [diff] [blame] | 29 | |
| 30 | INVALID-ENCODING: Invalid encoding |
| 31 | BAD-ABBREV: Abbreviation starts with an Array or a Blob |
| 32 | UNEXPECTED-EOF: Unexpected end of file |
| 33 | BAD-ABBREV-NUMBER: Invalid abbrev number |
Filipe Cabecinhas | fcd044b | 2015-01-30 18:13:50 +0000 | [diff] [blame] | 34 | BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced |
| 35 | BAD-BITWIDTH: Bitwidth for integer type out of range |
JF Bastien | 30bf96b | 2015-02-22 19:32:03 +0000 | [diff] [blame] | 36 | BAD-ALIGN: Invalid alignment value |
David Blaikie | 675e8cb | 2015-03-16 21:35:48 +0000 | [diff] [blame] | 37 | MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand |
David Blaikie | c695cc7 | 2015-03-16 21:48:46 +0000 | [diff] [blame] | 38 | MISMATCHED-EXPLICIT-LOAD: Explicit load type does not match pointee type of pointer operand |
David Blaikie | 12cf5d70 | 2015-03-16 22:03:50 +0000 | [diff] [blame] | 39 | MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand |
David Blaikie | dbe6e0f | 2015-04-17 06:40:14 +0000 | [diff] [blame] | 40 | MISMATCHED-EXPLICIT-CALL: Explicit call type does not match pointee type of callee operand |
| 41 | NON-FUNCTION-EXPLICIT-CALL: Explicit call type is not a function type |
David Blaikie | 5ea1f7b | 2015-04-24 18:06:06 +0000 | [diff] [blame] | 42 | MISMATCHED-EXPLICIT-INVOKE: Explicit invoke type does not match pointee type of callee operand |
| 43 | NON-FUNCTION-EXPLICIT-INVOKE: Explicit invoke type is not a function type |
Filipe Cabecinhas | ecf8f7f | 2015-02-16 00:03:11 +0000 | [diff] [blame] | 44 | |
| 45 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \ |
| 46 | RUN: FileCheck --check-prefix=EXTRACT-ARRAY %s |
| 47 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \ |
| 48 | RUN: FileCheck --check-prefix=EXTRACT-STRUCT %s |
| 49 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \ |
| 50 | RUN: FileCheck --check-prefix=EXTRACT-IDXS %s |
| 51 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \ |
| 52 | RUN: FileCheck --check-prefix=INSERT-ARRAY %s |
| 53 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \ |
| 54 | RUN: FileCheck --check-prefix=INSERT-STRUCT %s |
| 55 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \ |
| 56 | RUN: FileCheck --check-prefix=INSERT-IDXS %s |
| 57 | |
| 58 | |
| 59 | EXTRACT-ARRAY: EXTRACTVAL: Invalid array index |
| 60 | EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index |
| 61 | EXTRACT-IDXS: EXTRACTVAL: Invalid type |
| 62 | INSERT-ARRAY: INSERTVAL: Invalid array index |
| 63 | INSERT-STRUCT: INSERTVAL: Invalid struct index |
| 64 | INSERT-IDXS: INSERTVAL: Invalid type |
Filipe Cabecinhas | 2255427 | 2015-04-14 14:07:15 +0000 | [diff] [blame] | 65 | |
| 66 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \ |
| 67 | RUN: FileCheck --check-prefix=NO-MODULE %s |
| 68 | |
| 69 | NO-MODULE: Malformed IR file |
Filipe Cabecinhas | ea79c5b | 2015-04-22 09:06:21 +0000 | [diff] [blame] | 70 | |
| 71 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \ |
| 72 | RUN: FileCheck --check-prefix=FP-SHIFT %s |
| 73 | |
| 74 | FP-SHIFT: Invalid record |
Filipe Cabecinhas | ee48fea | 2015-04-23 13:25:35 +0000 | [diff] [blame] | 75 | |
| 76 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \ |
| 77 | RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s |
| 78 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \ |
| 79 | RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s |
| 80 | |
| 81 | HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData |
Filipe Cabecinhas | 6621cb7 | 2015-04-23 13:38:21 +0000 | [diff] [blame] | 82 | |
| 83 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-type.bc 2>&1 | \ |
| 84 | RUN: FileCheck --check-prefix=ARRAY-TYPE %s |
| 85 | |
| 86 | ARRAY-TYPE: Array element type can't be an Array or a Blob |
Filipe Cabecinhas | ff1e234 | 2015-04-24 11:30:15 +0000 | [diff] [blame] | 87 | |
| 88 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-extractelement.bc 2>&1 | \ |
| 89 | RUN: FileCheck --check-prefix=INVALID-TYPE %s |
| 90 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-insertelement.bc 2>&1 | \ |
| 91 | RUN: FileCheck --check-prefix=INVALID-TYPE %s |
| 92 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-shufflevector.bc 2>&1 | \ |
| 93 | RUN: FileCheck --check-prefix=INVALID-TYPE %s |
| 94 | |
| 95 | INVALID-TYPE: Invalid type for value |
Filipe Cabecinhas | b435d0f | 2015-04-28 20:18:47 +0000 | [diff] [blame] | 96 | |
| 97 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch.bc 2>&1 | \ |
| 98 | RUN: FileCheck --check-prefix=FWDREF-TYPE %s |
| 99 | |
| 100 | FWDREF-TYPE: Invalid record |
Filipe Cabecinhas | f15fb03 | 2015-04-29 01:27:01 +0000 | [diff] [blame^] | 101 | |
| 102 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-element-type.bc 2>&1 | \ |
| 103 | RUN: FileCheck --check-prefix=ELEMENT-TYPE %s |
| 104 | RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-element-type.bc 2>&1 | \ |
| 105 | RUN: FileCheck --check-prefix=ELEMENT-TYPE %s |
| 106 | |
| 107 | ELEMENT-TYPE: Invalid type |