summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-24 03:29:47 +0000
committerChris Lattner <sabre@nondot.org>2007-04-24 03:29:47 +0000
commit1e50c299a8e8651d0dc1908673ae28cc7d532e53 (patch)
tree4d0ff673a6ffe8a1e3d2c21bf94a56eea0c80e90 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent4cfa616ceef12f01aa20ef5fb6e29e25ef1b67e5 (diff)
downloadbcm5719-llvm-1e50c299a8e8651d0dc1908673ae28cc7d532e53.tar.gz
bcm5719-llvm-1e50c299a8e8651d0dc1908673ae28cc7d532e53.zip
fix off-by-one computing size for section abbrevs
llvm-svn: 36388
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index b229a764ef9..ea314f69ebf 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud