aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2023-02-27 11:29:23 -0800
committerArthur Eubanks <aeubanks@google.com>2023-02-27 13:11:09 -0800
commit01dacc41f3c20b9bfddf0ca68b63f16666a1725e (patch)
tree2681face6c656a95196cfb5ba037d0aff3750c71 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentfa66e4bd9315d20990c86ef57c7901b6dc71bd02 (diff)
downloadllvm-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/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp11
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;
}