diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -901,15 +901,8 @@ 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 @@ Code = bitc::TYPE_CODE_POINTER; TypeVals.push_back(VE.getTypeID(PTy->getNonOpaquePointerElementType())); TypeVals.push_back(AddressSpace); - if (AddressSpace == 0) - AbbrevToUse = PtrAbbrev; } break; }