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 21RUN: 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 25RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-mismatched-explicit-type.bc 2>&1 | \ 26RUN: FileCheck --check-prefix=MISMATCHED-EXPLICIT-INVOKE %s 27RUN: not llvm-dis -disable-output %p/Inputs/invalid-invoke-non-function-explicit-type.bc 2>&1 | \ 28RUN: FileCheck --check-prefix=NON-FUNCTION-EXPLICIT-INVOKE %s 29 30INVALID-ENCODING: Invalid encoding 31BAD-ABBREV: Abbreviation starts with an Array or a Blob 32UNEXPECTED-EOF: Unexpected end of file 33BAD-ABBREV-NUMBER: Invalid abbrev number 34BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced 35BAD-BITWIDTH: Bitwidth for integer type out of range 36BAD-ALIGN: Invalid alignment value 37MISMATCHED-EXPLICIT-GEP: Explicit gep type does not match pointee type of pointer operand 38MISMATCHED-EXPLICIT-LOAD: Explicit load type does not match pointee type of pointer operand 39MISMATCHED-EXPLICIT-GEP-OPERATOR: Explicit gep operator type does not match pointee type of pointer operand 40MISMATCHED-EXPLICIT-CALL: Explicit call type does not match pointee type of callee operand 41NON-FUNCTION-EXPLICIT-CALL: Explicit call type is not a function type 42MISMATCHED-EXPLICIT-INVOKE: Explicit invoke type does not match pointee type of callee operand 43NON-FUNCTION-EXPLICIT-INVOKE: Explicit invoke type is not a function type 44 45RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \ 46RUN: FileCheck --check-prefix=EXTRACT-ARRAY %s 47RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \ 48RUN: FileCheck --check-prefix=EXTRACT-STRUCT %s 49RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \ 50RUN: FileCheck --check-prefix=EXTRACT-IDXS %s 51RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \ 52RUN: FileCheck --check-prefix=INSERT-ARRAY %s 53RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \ 54RUN: FileCheck --check-prefix=INSERT-STRUCT %s 55RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \ 56RUN: FileCheck --check-prefix=INSERT-IDXS %s 57 58 59EXTRACT-ARRAY: EXTRACTVAL: Invalid array index 60EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index 61EXTRACT-IDXS: EXTRACTVAL: Invalid type 62INSERT-ARRAY: INSERTVAL: Invalid array index 63INSERT-STRUCT: INSERTVAL: Invalid struct index 64INSERT-IDXS: INSERTVAL: Invalid type 65 66RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \ 67RUN: FileCheck --check-prefix=NO-MODULE %s 68 69NO-MODULE: Malformed IR file 70 71RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \ 72RUN: FileCheck --check-prefix=FP-SHIFT %s 73 74FP-SHIFT: Invalid record 75 76RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \ 77RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s 78RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \ 79RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s 80 81HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData 82 83RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-type.bc 2>&1 | \ 84RUN: FileCheck --check-prefix=ARRAY-TYPE %s 85 86ARRAY-TYPE: Array element type can't be an Array or a Blob 87 88RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-extractelement.bc 2>&1 | \ 89RUN: FileCheck --check-prefix=INVALID-TYPE %s 90RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-insertelement.bc 2>&1 | \ 91RUN: FileCheck --check-prefix=INVALID-TYPE %s 92RUN: not llvm-dis -disable-output %p/Inputs/invalid-non-vector-shufflevector.bc 2>&1 | \ 93RUN: FileCheck --check-prefix=INVALID-TYPE %s 94 95INVALID-TYPE: Invalid type for value 96 97RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch.bc 2>&1 | \ 98RUN: FileCheck --check-prefix=FWDREF-TYPE %s 99 100FWDREF-TYPE: Invalid record 101 102RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-element-type.bc 2>&1 | \ 103RUN: FileCheck --check-prefix=ELEMENT-TYPE %s 104RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-element-type.bc 2>&1 | \ 105RUN: FileCheck --check-prefix=ELEMENT-TYPE %s 106RUN: not llvm-dis -disable-output %p/Inputs/invalid-pointer-element-type.bc 2>&1 | \ 107RUN: FileCheck --check-prefix=ELEMENT-TYPE %s 108 109ELEMENT-TYPE: Invalid type 110 111RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-op-not-2nd-to-last.bc 2>&1 | \ 112RUN: FileCheck --check-prefix=ARRAY-NOT-2LAST %s 113 114ARRAY-NOT-2LAST: Array op not second to last 115 116RUN: not llvm-dis -disable-output %p/Inputs/invalid-too-big-fwdref.bc 2>&1 | \ 117RUN: FileCheck --check-prefix=HUGE-FWDREF %s 118 119HUGE-FWDREF: Invalid record 120 121RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-pointer-type.bc 2>&1 | \ 122RUN: FileCheck --check-prefix=LOAD-BAD-TYPE %s 123 124LOAD-BAD-TYPE: Load operand is not a pointer type 125 126RUN: not llvm-dis -disable-output %p/Inputs/invalid-GCTable-overflow.bc 2>&1 | \ 127RUN: FileCheck --check-prefix=GCTABLE-OFLOW %s 128 129GCTABLE-OFLOW: Invalid ID 130