Fix Abbrev emission in WriteIdentificationBlock
authorMehdi Amini <mehdi.amini@apple.com>
Thu, 5 Nov 2015 00:25:03 +0000 (00:25 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Thu, 5 Nov 2015 00:25:03 +0000 (00:25 +0000)
This Abbrev was not emitted and basically unused, just leacking there.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252110 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bitcode/Writer/BitcodeWriter.cpp

index e9bc507..755167a 100644 (file)
@@ -2855,8 +2855,9 @@ static void WriteIdentificationBlock(const Module *M, BitstreamWriter &Stream) {
   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();
 }