[llvm-commits] CVS: llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Chris Lattner sabre at nondot.org
Sun May 6 01:22:08 PDT 2007



Changes in directory llvm/lib/Bitcode/Reader:

BitcodeReader.cpp updated: 1.45 -> 1.46
---
Log message:

Allow structs with zero fields.



---
Diffs of the changes:  (+1 -1)

 BitcodeReader.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff -u llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.45 llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.46
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.45	Sun May  6 02:33:01 2007
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp	Sun May  6 03:21:50 2007
@@ -326,7 +326,7 @@
       break;
     }
     case bitc::TYPE_CODE_STRUCT: {  // STRUCT: [ispacked, eltty x N]
-      if (Record.size() < 2)
+      if (Record.size() < 1)
         return Error("Invalid STRUCT type record");
       std::vector<const Type*> EltTys;
       for (unsigned i = 1, e = Record.size(); i != e; ++i)






More information about the llvm-commits mailing list