summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 08:22:10 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 08:22:10 +0000
commitb55a5803b2ebea65c1ab404af05c843599e2a7d3 (patch)
treef69fbd56b0f182249e97cd369141e19ba3a54c0e /include
parent7108dce324eed700ba32a8a5e0a65b1161a00232 (diff)
downloadllvm-b55a5803b2ebea65c1ab404af05c843599e2a7d3.tar.gz
llvm-b55a5803b2ebea65c1ab404af05c843599e2a7d3.tar.bz2
llvm-b55a5803b2ebea65c1ab404af05c843599e2a7d3.tar.xz
allow zero-length arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Bitcode/BitstreamWriter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h
index 20bcc1c8b5..64598edbd5 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 {