Allow structs with zero fields.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-05-06 08:21:50 +00:00
parent 9850b57587
commit 7108dce324

View File

@ -326,7 +326,7 @@ bool BitcodeReader::ParseTypeTable() {
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)