From 7108dce324eed700ba32a8a5e0a65b1161a00232 Mon Sep 17 00:00:00 2001
From: Chris Lattner <sabre@nondot.org>
Date: Sun, 6 May 2007 08:21:50 +0000
Subject: [PATCH] Allow structs with zero fields.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36862 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/Bitcode/Reader/BitcodeReader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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<const Type*> EltTys;
       for (unsigned i = 1, e = Record.size(); i != e; ++i)