From 631a8ed3ff72a25c03c61319e85ff49aa601d464 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 24 Apr 2007 03:29:47 +0000 Subject: [PATCH] fix off-by-one computing size for section abbrevs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36388 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index b229a764ef9..ea314f69ebf 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -220,7 +220,7 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, Abbv->Add(BitCodeAbbrevOp(0)); else Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::FixedWidth, - Log2_32_Ceil(SectionMap.size()))); + Log2_32_Ceil(SectionMap.size()+1))); // Don't bother emitting vis + thread local. SimpleGVarAbbrev = Stream.EmitAbbrev(Abbv); }