[PATCH] D26168: Bitcode: Simplify BitstreamWriter::EnterBlockInfoBlock() interface.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 18:28:47 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL285660: Bitcode: Simplify BitstreamWriter::EnterBlockInfoBlock() interface. (authored by pcc).

Changed prior to commit:
  https://reviews.llvm.org/D26168?vs=76486&id=76514#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26168

Files:
  cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
  cfe/trunk/lib/Serialization/ASTWriter.cpp
  cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
  llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
  llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp


Index: cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
===================================================================
--- cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
+++ cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
@@ -436,7 +436,7 @@
 }
 
 void SDiagsWriter::EmitBlockInfoBlock() {
-  State->Stream.EnterBlockInfoBlock(3);
+  State->Stream.EnterBlockInfoBlock();
 
   using namespace llvm;
   llvm::BitstreamWriter &Stream = State->Stream;
Index: cfe/trunk/lib/Serialization/ASTWriter.cpp
===================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp
@@ -991,7 +991,7 @@
 
 void ASTWriter::WriteBlockInfoBlock() {
   RecordData Record;
-  Stream.EnterSubblock(llvm::bitc::BLOCKINFO_BLOCK_ID, 3);
+  Stream.EnterBlockInfoBlock();
 
 #define BLOCK(X) EmitBlockID(X ## _ID, #X, Stream, Record)
 #define RECORD(X) EmitRecordID(X, #X, Stream, Record)
Index: cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
===================================================================
--- cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
+++ cfe/trunk/lib/Serialization/GlobalModuleIndex.cpp
@@ -460,7 +460,7 @@
 void
 GlobalModuleIndexBuilder::emitBlockInfoBlock(llvm::BitstreamWriter &Stream) {
   SmallVector<uint64_t, 64> Record;
-  Stream.EnterSubblock(llvm::bitc::BLOCKINFO_BLOCK_ID, 3);
+  Stream.EnterBlockInfoBlock();
 
 #define BLOCK(X) emitBlockID(X ## _ID, #X, Stream, Record)
 #define RECORD(X) emitRecordID(X, #X, Stream, Record)
Index: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3031,7 +3031,7 @@
   // 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();
Index: llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
===================================================================
--- llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
+++ llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
@@ -506,8 +506,8 @@
   //===--------------------------------------------------------------------===//
 
   /// 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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26168.76514.patch
Type: text/x-patch
Size: 2830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161101/20df66f5/attachment.bin>


More information about the llvm-commits mailing list