[llvm] r285660 - Bitcode: Simplify BitstreamWriter::EnterBlockInfoBlock() interface.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 31 18:18:58 PDT 2016
Author: pcc
Date: Mon Oct 31 20:18:57 2016
New Revision: 285660
URL: http://llvm.org/viewvc/llvm-project?rev=285660&view=rev
Log:
Bitcode: Simplify BitstreamWriter::EnterBlockInfoBlock() interface.
No block info block should need to define local abbreviations, so we can
always use a code width of 2.
Also change all block info block writers to use EnterBlockInfoBlock.
Differential Revision: https://reviews.llvm.org/D26168
Modified:
llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Modified: llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h?rev=285660&r1=285659&r2=285660&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h (original)
+++ llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h Mon Oct 31 20:18:57 2016
@@ -506,8 +506,8 @@ public:
//===--------------------------------------------------------------------===//
/// EnterBlockInfoBlock - Start emitting the BLOCKINFO_BLOCK.
- void EnterBlockInfoBlock(unsigned CodeWidth) {
- EnterSubblock(bitc::BLOCKINFO_BLOCK_ID, CodeWidth);
+ void EnterBlockInfoBlock() {
+ EnterSubblock(bitc::BLOCKINFO_BLOCK_ID, 2);
BlockInfoCurBID = ~0U;
}
private:
Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=285660&r1=285659&r2=285660&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Mon Oct 31 20:18:57 2016
@@ -3031,7 +3031,7 @@ void ModuleBitcodeWriter::writeBlockInfo
// We only want to emit block info records for blocks that have multiple
// instances: CONSTANTS_BLOCK, FUNCTION_BLOCK and VALUE_SYMTAB_BLOCK.
// Other blocks can define their abbrevs inline.
- Stream.EnterBlockInfoBlock(2);
+ Stream.EnterBlockInfoBlock();
{ // 8-bit fixed-width VST_CODE_ENTRY/VST_CODE_BBENTRY strings.
BitCodeAbbrev *Abbv = new BitCodeAbbrev();
More information about the llvm-commits
mailing list