allow zero-length arrays

llvm-svn: 36863
This commit is contained in:
Chris Lattner 2007-05-06 08:22:10 +00:00
parent 3c5616ee12
commit 4492f73eb4
1 changed files with 1 additions and 1 deletions

View File

@ -284,9 +284,9 @@ public:
unsigned RecordIdx = 0;
for (unsigned i = 0, e = Abbv->getNumOperandInfos(); i != e; ++i) {
assert(RecordIdx < Vals.size() && "Invalid abbrev/record");
const BitCodeAbbrevOp &Op = Abbv->getOperandInfo(i);
if (Op.isLiteral() || Op.getEncoding() != BitCodeAbbrevOp::Array) {
assert(RecordIdx < Vals.size() && "Invalid abbrev/record");
EmitAbbreviatedField(Op, Vals[RecordIdx]);
++RecordIdx;
} else {