blob: f2271e81f5bcdfb2f9e3647bab94b865dd4c3ce7 [file] [log] [blame]
Filipe Cabecinhasde968ec2015-01-24 04:15:05 +00001RUN: 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
Filipe Cabecinhasfcd044b2015-01-30 18:13:50 +00009RUN: 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
JF Bastien30bf96b2015-02-22 19:32:03 +000013RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc 2>&1 | \
14RUN: FileCheck --check-prefix=BAD-ALIGN %s
David Blaikie675e8cb2015-03-16 21:35:48 +000015RUN: not llvm-dis -disable-output %p/Inputs/invalid-gep-mismatched-explicit-type.bc 2>&1 | \
16RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-GEP %s
David Blaikiec695cc72015-03-16 21:48:46 +000017RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-mismatched-explicit-type.bc 2>&1 | \
18RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-LOAD %s
David Blaikie12cf5d702015-03-16 22:03:50 +000019RUN: 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
David Blaikiedbe6e0f2015-04-17 06:40:14 +000021RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-mismatched-explicit-type.bc 2>&1 | \
22RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-CALL %s
23RUN: not llvm-dis -disable-output %p/Inputs/invalid-call-non-function-explicit-type.bc 2>&1 | \
24RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-CALL %s
Filipe Cabecinhasde968ec2015-01-24 04:15:05 +000025
26INVALID-ENCODING: Invalid encoding
27BAD-ABBREV: Abbreviation starts with an Array or a Blob
28UNEXPECTED-EOF: Unexpected end of file
29BAD-ABBREV-NUMBER: Invalid abbrev number
Filipe Cabecinhasfcd044b2015-01-30 18:13:50 +000030BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced
31BAD-BITWIDTH: Bitwidth for integer type out of range
JF Bastien30bf96b2015-02-22 19:32:03 +000032BAD-ALIGN: Invalid alignment value
David Blaikie675e8cb2015-03-16 21:35:48 +000033MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand
David Blaikiec695cc72015-03-16 21:48:46 +000034MISMATCHED-EXPLICIT-LOAD: Explicit load type does not match pointee type of pointer operand
David Blaikie12cf5d702015-03-16 22:03:50 +000035MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand
David Blaikiedbe6e0f2015-04-17 06:40:14 +000036MISMATCHED-EXPLICIT-CALL: Explicit call type does not match pointee type of callee operand
37NON-FUNCTION-EXPLICIT-CALL: Explicit call type is not a function type
Filipe Cabecinhasecf8f7f2015-02-16 00:03:11 +000038
39RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \
40RUN: FileCheck --check-prefix=EXTRACT-ARRAY %s
41RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \
42RUN: FileCheck --check-prefix=EXTRACT-STRUCT %s
43RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \
44RUN: FileCheck --check-prefix=EXTRACT-IDXS %s
45RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \
46RUN: FileCheck --check-prefix=INSERT-ARRAY %s
47RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \
48RUN: FileCheck --check-prefix=INSERT-STRUCT %s
49RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \
50RUN: FileCheck --check-prefix=INSERT-IDXS %s
51
52
53EXTRACT-ARRAY: EXTRACTVAL: Invalid array index
54EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index
55EXTRACT-IDXS: EXTRACTVAL: Invalid type
56INSERT-ARRAY: INSERTVAL: Invalid array index
57INSERT-STRUCT: INSERTVAL: Invalid struct index
58INSERT-IDXS: INSERTVAL: Invalid type
Filipe Cabecinhas22554272015-04-14 14:07:15 +000059
60RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \
61RUN: FileCheck --check-prefix=NO-MODULE %s
62
63NO-MODULE: Malformed IR file
Filipe Cabecinhasea79c5b2015-04-22 09:06:21 +000064
65RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \
66RUN: FileCheck --check-prefix=FP-SHIFT %s
67
68FP-SHIFT: Invalid record
Filipe Cabecinhasee48fea2015-04-23 13:25:35 +000069
70RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \
71RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
72RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \
73RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
74
75HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData
Filipe Cabecinhas6621cb72015-04-23 13:38:21 +000076
77RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-type.bc 2>&1 | \
78RUN: FileCheck --check-prefix=ARRAY-TYPE %s
79
80ARRAY-TYPE: Array element type can't be an Array or a Blob
Filipe Cabecinhasff1e2342015-04-24 11:30:15 +000081
82RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-extractelement.bc 2>&1 | \
83RUN: FileCheck --check-prefix=INVALID-TYPE %s
84RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-insertelement.bc 2>&1 | \
85RUN: FileCheck --check-prefix=INVALID-TYPE %s
86RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-shufflevector.bc 2>&1 | \
87RUN: FileCheck --check-prefix=INVALID-TYPE %s
88
89INVALID-TYPE: Invalid type for value