diff options
author | Stephen Hines <srhines@google.com> | 2015-04-01 18:49:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-01 18:49:26 +0000 |
commit | 3fa16bd6062e23bcdb82ed4dd965674792e6b761 (patch) | |
tree | 9348fc507292f7e8715d22d64ce5a32131b4f875 /test/Bitcode/invalid.test | |
parent | beed47390a60f6f0c77532b3d3f76bb47ef49423 (diff) | |
parent | ebe69fe11e48d322045d5949c83283927a0d790b (diff) | |
download | external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.zip external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.gz external_llvm-3fa16bd6062e23bcdb82ed4dd965674792e6b761.tar.bz2 |
Merge "Update aosp/master LLVM for rebase to r230699."
Diffstat (limited to 'test/Bitcode/invalid.test')
-rw-r--r-- | test/Bitcode/invalid.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/Bitcode/invalid.test b/test/Bitcode/invalid.test new file mode 100644 index 0000000..fb81888 --- /dev/null +++ b/test/Bitcode/invalid.test @@ -0,0 +1,43 @@ +RUN: not llvm-dis -disable-output %p/Inputs/invalid-pr20485.bc 2>&1 | \ +RUN: FileCheck --check-prefix=INVALID-ENCODING %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev.bc 2>&1 | \ +RUN: FileCheck --check-prefix=BAD-ABBREV %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-unexpected-eof.bc 2>&1 | \ +RUN: FileCheck --check-prefix=UNEXPECTED-EOF %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-bad-abbrev-number.bc 2>&1 | \ +RUN: FileCheck --check-prefix=BAD-ABBREV-NUMBER %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-type-table-forward-ref.bc 2>&1 | \ +RUN: FileCheck --check-prefix=BAD-TYPE-TABLE-FORWARD-REF %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-bitwidth.bc 2>&1 | \ +RUN: FileCheck --check-prefix=BAD-BITWIDTH %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-align.bc 2>&1 | \ +RUN: FileCheck --check-prefix=BAD-ALIGN %s + +INVALID-ENCODING: Invalid encoding +BAD-ABBREV: Abbreviation starts with an Array or a Blob +UNEXPECTED-EOF: Unexpected end of file +BAD-ABBREV-NUMBER: Invalid abbrev number +BAD-TYPE-TABLE-FORWARD-REF: Invalid TYPE table: Only named structs can be forward referenced +BAD-BITWIDTH: Bitwidth for integer type out of range +BAD-ALIGN: Invalid alignment value + +RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-array-idx.bc 2>&1 | \ +RUN: FileCheck --check-prefix=EXTRACT-ARRAY %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-struct-idx.bc 2>&1 | \ +RUN: FileCheck --check-prefix=EXTRACT-STRUCT %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-extractval-too-many-idxs.bc 2>&1 | \ +RUN: FileCheck --check-prefix=EXTRACT-IDXS %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-array-idx.bc 2>&1 | \ +RUN: FileCheck --check-prefix=INSERT-ARRAY %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-struct-idx.bc 2>&1 | \ +RUN: FileCheck --check-prefix=INSERT-STRUCT %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-insertval-too-many-idxs.bc 2>&1 | \ +RUN: FileCheck --check-prefix=INSERT-IDXS %s + + +EXTRACT-ARRAY: EXTRACTVAL: Invalid array index +EXTRACT-STRUCT: EXTRACTVAL: Invalid struct index +EXTRACT-IDXS: EXTRACTVAL: Invalid type +INSERT-ARRAY: INSERTVAL: Invalid array index +INSERT-STRUCT: INSERTVAL: Invalid struct index +INSERT-IDXS: INSERTVAL: Invalid type |