[NFC] Remove uses of PointerType::getElementType()

Instead use either Type::getPointerElementType() or
Type::getNonOpaquePointerElementType().

This is part of D117885, in preparation for deprecating the API.
This commit is contained in:
Nikita Popov
2022-01-21 13:03:15 +01:00
parent 2a14bc55c5
commit aa97bc116d
54 changed files with 182 additions and 188 deletions

View File

@@ -948,7 +948,7 @@ void ModuleBitcodeWriter::writeTypeTable() {
} else {
// POINTER: [pointee type, address space]
Code = bitc::TYPE_CODE_POINTER;
TypeVals.push_back(VE.getTypeID(PTy->getElementType()));
TypeVals.push_back(VE.getTypeID(PTy->getNonOpaquePointerElementType()));
TypeVals.push_back(AddressSpace);
if (AddressSpace == 0)
AbbrevToUse = PtrAbbrev;