Skip to content

Commit

Permalink
Revert "Don't assert if materializing before seeing any function bodies"
Browse files Browse the repository at this point in the history
This reverts r251667 since it broke the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251671 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
filcab committed Oct 30, 2015
1 parent ff7c978 commit 5f6abbd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions lib/Bitcode/Reader/BitcodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Binary file removed test/Bitcode/Inputs/invalid-no-function-block.bc
Binary file not shown.
5 changes: 0 additions & 5 deletions test/Bitcode/invalid.test
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5f6abbd

Please sign in to comment.