diff options
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 | ||||
-rw-r--r-- | llvm/test/Bitcode/Inputs/invalid-no-function-block.bc | bin | 548 -> 0 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/invalid.test | 5 |
3 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index d2cbe9e85a4..e23f8176330 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3054,9 +3054,7 @@ std::error_code BitcodeReader::rememberAndSkipFunctionBodies() { if (Stream.AtEndOfStream()) return error("Could not find function in stream"); - if (!SeenFirstFunctionBody) - return error("Trying to materialize functions before seeing function blocks"); - + assert(SeenFirstFunctionBody); // An old bitcode file with the symbol table at the end would have // finished the parse greedily. assert(SeenValueSymbolTable); diff --git a/llvm/test/Bitcode/Inputs/invalid-no-function-block.bc b/llvm/test/Bitcode/Inputs/invalid-no-function-block.bc Binary files differdeleted file mode 100644 index 52b65588e4a..00000000000 --- a/llvm/test/Bitcode/Inputs/invalid-no-function-block.bc +++ /dev/null diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test index 24ccd8bccd5..69104046df2 100644 --- a/llvm/test/Bitcode/invalid.test +++ b/llvm/test/Bitcode/invalid.test @@ -207,8 +207,3 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-alias-type-mismatch.bc 2>&1 RUN: FileCheck --check-prefix=ALIAS-TYPE-MISMATCH %s ALIAS-TYPE-MISMATCH: Alias and aliasee types don't match - -RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-function-block.bc 2>&1 | \ -RUN: FileCheck --check-prefix=NO-FUNCTION-BLOCK %s - -NO-FUNCTION-BLOCK: Trying to materialize functions before seeing function blocks |