From b55a5803b2ebea65c1ab404af05c843599e2a7d3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 May 2007 08:22:10 +0000 Subject: [PATCH] allow zero-length arrays git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36863 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Bitcode/BitstreamWriter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h index 20bcc1c8b54..64598edbd56 100644 --- a/include/llvm/Bitcode/BitstreamWriter.h +++ b/include/llvm/Bitcode/BitstreamWriter.h @@ -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 { -- 2.34.1