From 3eae1bf4c2c768dfadb03ede0e43168dbac4e683 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 14 Jul 2023 10:51:59 +0200 Subject: [llvm] Remove uses of getNonOpaquePointerElementType() (NFC) --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 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 f2bfb4e..9416c7f 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -977,18 +977,11 @@ void ModuleBitcodeWriter::writeTypeTable() { case Type::PointerTyID: { PointerType *PTy = cast(T); unsigned AddressSpace = PTy->getAddressSpace(); - if (PTy->isOpaque()) { - // OPAQUE_POINTER: [address space] - Code = bitc::TYPE_CODE_OPAQUE_POINTER; - TypeVals.push_back(AddressSpace); - if (AddressSpace == 0) - AbbrevToUse = OpaquePtrAbbrev; - } else { - // POINTER: [pointee type, address space] - Code = bitc::TYPE_CODE_POINTER; - TypeVals.push_back(VE.getTypeID(PTy->getNonOpaquePointerElementType())); - TypeVals.push_back(AddressSpace); - } + // OPAQUE_POINTER: [address space] + Code = bitc::TYPE_CODE_OPAQUE_POINTER; + TypeVals.push_back(AddressSpace); + if (AddressSpace == 0) + AbbrevToUse = OpaquePtrAbbrev; break; } case Type::FunctionTyID: { -- cgit v1.1