From 8d079d54a311de24ff036c953e53fa47435282e2 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Thu, 5 Nov 2015 00:25:03 +0000 Subject: [PATCH] Fix Abbrev emission in WriteIdentificationBlock This Abbrev was not emitted and basically unused, just leacking there. From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252110 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index e9bc5074039..755167a9636 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -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 Vals = {bitc::BITCODE_CURRENT_EPOCH}; - Stream.EmitRecord(bitc::IDENTIFICATION_CODE_EPOCH, Vals); + Stream.EmitRecord(bitc::IDENTIFICATION_CODE_EPOCH, Vals, EpochAbbrev); Stream.ExitBlock(); } -- 2.34.1