From: Chris Lattner Date: Sun, 6 May 2007 08:21:50 +0000 (+0000) Subject: Allow structs with zero fields. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7108dce324eed700ba32a8a5e0a65b1161a00232;p=oota-llvm.git Allow structs with zero fields. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36862 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 2e9de1c1f13..ffbd0e8a0e5 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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 EltTys; for (unsigned i = 1, e = Record.size(); i != e; ++i)