allow zero-length arrays

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

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 {