diff options
author | Arthur Eubanks <aeubanks@google.com> | 2023-02-27 11:29:23 -0800 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2023-02-27 13:11:09 -0800 |
commit | 01dacc41f3c20b9bfddf0ca68b63f16666a1725e (patch) | |
tree | 2681face6c656a95196cfb5ba037d0aff3750c71 /llvm/lib/Bitcode | |
parent | fa66e4bd9315d20990c86ef57c7901b6dc71bd02 (diff) | |
download | llvm-01dacc41f3c20b9bfddf0ca68b63f16666a1725e.zip llvm-01dacc41f3c20b9bfddf0ca68b63f16666a1725e.tar.gz llvm-01dacc41f3c20b9bfddf0ca68b63f16666a1725e.tar.bz2 |
[Bitcode] Remove typed pointer abbreviation
Since typed pointers are deprecated.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D144901
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
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<BitCodeAbbrev>(); - 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<BitCodeAbbrev>(); + auto Abbv = std::make_shared<BitCodeAbbrev>(); 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; } |