From 01dacc41f3c20b9bfddf0ca68b63f16666a1725e Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Mon, 27 Feb 2023 11:29:23 -0800 Subject: [Bitcode] Remove typed pointer abbreviation Since typed pointers are deprecated. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D144901 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 16d1399..51756eb 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -901,15 +901,8 @@ void ModuleBitcodeWriter::writeTypeTable() { uint64_t NumBits = VE.computeBitsRequiredForTypeIndicies(); - // Abbrev for TYPE_CODE_POINTER. - auto Abbv = std::make_shared(); - Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER)); - Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits)); - Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0 - unsigned PtrAbbrev = Stream.EmitAbbrev(std::move(Abbv)); - // Abbrev for TYPE_CODE_OPAQUE_POINTER. - Abbv = std::make_shared(); + auto Abbv = std::make_shared(); Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_OPAQUE_POINTER)); Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0 unsigned OpaquePtrAbbrev = Stream.EmitAbbrev(std::move(Abbv)); @@ -995,8 +988,6 @@ void ModuleBitcodeWriter::writeTypeTable() { Code = bitc::TYPE_CODE_POINTER; TypeVals.push_back(VE.getTypeID(PTy->getNonOpaquePointerElementType())); TypeVals.push_back(AddressSpace); - if (AddressSpace == 0) - AbbrevToUse = PtrAbbrev; } break; } -- cgit v1.1