1RUN: not llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \
2RUN:   FileCheck --check-prefix=INVALID-ENCODING %s
3RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \
4RUN:   FileCheck --check-prefix=BAD-ABBREV %s
5RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \
6RUN:   FileCheck --check-prefix=UNEXPECTED-EOF %s
7RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \
8RUN:   FileCheck --check-prefix=BAD-ABBREV-NUMBER %s
9RUN: not llvm-dis -disable-output %p/Inputs/invalid-type-table-forward-ref.bc 2>&1 | \
10RUN:   FileCheck --check-prefix=BAD-TYPE-TABLE-FORWARD-REF %s
11RUN: not llvm-dis -disable-output %p/Inputs/invalid-bitwidth.bc 2>&1 | \
12RUN:   FileCheck --check-prefix=BAD-BITWIDTH %s
13RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc  2>&1 | \
14RUN:   FileCheck --check-prefix=BAD-ALIGN %s
15RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-mismatched-explicit-type.bc 2>&1 | \
16RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP %s
17RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-mismatched-explicit-type.bc 2>&1 | \
18RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-LOAD %s
19RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-operator-mismatched-explicit-type.bc 2>&1 | \
20RUN:   FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP-OPERATOR %s
21
22INVALID-ENCODING: Invalid encoding
23BAD-ABBREV: Abbreviation starts with an Array or a Blob
24UNEXPECTED-EOF: Unexpected end of file
25BAD-ABBREV-NUMBER: Invalid abbrev number
26BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced
27BAD-BITWIDTH: Bitwidth for integer type out of range
28BAD-ALIGN: Invalid alignment value
29MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand
30MISMATCHED-EXPLICIT-LOAD: Explicit load type does not match pointee type of pointer operand
31MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand
32
33RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \
34RUN:   FileCheck --check-prefix=EXTRACT-ARRAY %s
35RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \
36RUN:   FileCheck --check-prefix=EXTRACT-STRUCT %s
37RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \
38RUN:   FileCheck --check-prefix=EXTRACT-IDXS %s
39RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \
40RUN:   FileCheck --check-prefix=INSERT-ARRAY %s
41RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \
42RUN:   FileCheck --check-prefix=INSERT-STRUCT %s
43RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \
44RUN:   FileCheck --check-prefix=INSERT-IDXS %s
45
46
47EXTRACT-ARRAY: EXTRACTVAL: Invalid array index
48EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index
49EXTRACT-IDXS: EXTRACTVAL: Invalid type
50INSERT-ARRAY: INSERTVAL: Invalid array index
51INSERT-STRUCT: INSERTVAL: Invalid struct index
52INSERT-IDXS: INSERTVAL: Invalid type
53
54RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \
55RUN:   FileCheck --check-prefix=NO-MODULE %s
56
57NO-MODULE: Malformed IR file
58