summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 08:21:50 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 08:21:50 +0000
commit7108dce324eed700ba32a8a5e0a65b1161a00232 (patch)
treebba386101411a379b53b5732581bfdff06158693 /lib
parent9850b57587c5e7e3608ba881e62882e46f79025c (diff)
downloadllvm-7108dce324eed700ba32a8a5e0a65b1161a00232.tar.gz
llvm-7108dce324eed700ba32a8a5e0a65b1161a00232.tar.bz2
llvm-7108dce324eed700ba32a8a5e0a65b1161a00232.tar.xz
Allow structs with zero fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 2e9de1c1f1..ffbd0e8a0e 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<const Type*> EltTys;
for (unsigned i = 1, e = Record.size(); i != e; ++i)