[llvm] r251671 - Revert "Don't assert if materializing before seeing any function bodies"

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 17:00:58 PDT 2015


Author: filcab
Date: Thu Oct 29 19:00:58 2015
New Revision: 251671

URL: http://llvm.org/viewvc/llvm-project?rev=251671&view=rev
Log:
Revert "Don't assert if materializing before seeing any function bodies"

This reverts r251667 since it broke the bots.

Removed:
    llvm/trunk/test/Bitcode/Inputs/invalid-no-function-block.bc
Modified:
    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
    llvm/trunk/test/Bitcode/invalid.test

Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=251671&r1=251670&r2=251671&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Thu Oct 29 19:00:58 2015
@@ -3054,9 +3054,7 @@ std::error_code BitcodeReader::rememberA
 
   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);

Removed: llvm/trunk/test/Bitcode/Inputs/invalid-no-function-block.bc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/Inputs/invalid-no-function-block.bc?rev=251670&view=auto
==============================================================================
Binary files llvm/trunk/test/Bitcode/Inputs/invalid-no-function-block.bc (original) and llvm/trunk/test/Bitcode/Inputs/invalid-no-function-block.bc (removed) differ

Modified: llvm/trunk/test/Bitcode/invalid.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/invalid.test?rev=251671&r1=251670&r2=251671&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/invalid.test (original)
+++ llvm/trunk/test/Bitcode/invalid.test Thu Oct 29 19:00:58 2015
@@ -207,8 +207,3 @@ RUN: not llvm-dis -disable-output %p/Inp
 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




More information about the llvm-commits mailing list