[llvm] r252110 - Fix Abbrev emission in WriteIdentificationBlock

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 16:25:03 PST 2015


Author: mehdi_amini
Date: Wed Nov  4 18:25:03 2015
New Revision: 252110

URL: http://llvm.org/viewvc/llvm-project?rev=252110&view=rev
Log:
Fix Abbrev emission in WriteIdentificationBlock

This Abbrev was not emitted and basically unused, just leacking there.

From: Mehdi Amini <mehdi.amini at apple.com>

Modified:
    llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp

Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=252110&r1=252109&r2=252110&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Wed Nov  4 18:25:03 2015
@@ -2855,8 +2855,9 @@ static void WriteIdentificationBlock(con
   Abbv = new BitCodeAbbrev();
   Abbv->Add(BitCodeAbbrevOp(bitc::IDENTIFICATION_CODE_EPOCH));
   Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));
+  auto EpochAbbrev = Stream.EmitAbbrev(Abbv);
   SmallVector<unsigned, 1> Vals = {bitc::BITCODE_CURRENT_EPOCH};
-  Stream.EmitRecord(bitc::IDENTIFICATION_CODE_EPOCH, Vals);
+  Stream.EmitRecord(bitc::IDENTIFICATION_CODE_EPOCH, Vals, EpochAbbrev);
   Stream.ExitBlock();
 }
 




More information about the llvm-commits mailing list