aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-01-21 13:03:15 +0100
committerNikita Popov <npopov@redhat.com>2022-01-25 09:44:52 +0100
commitaa97bc116d343f7b6f222d7229668de5d361b312 (patch)
tree629401ba0e78022d842d78039bdce5eb61605c69 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent2a14bc55c547f0fc7285b783b5320338c3ffdc42 (diff)
downloadllvm-aa97bc116d343f7b6f222d7229668de5d361b312.zip
llvm-aa97bc116d343f7b6f222d7229668de5d361b312.tar.gz
llvm-aa97bc116d343f7b6f222d7229668de5d361b312.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index e0efdf2..8097847 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -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;