[PATCH] D117885: [OpaquePtrs] Deprecate PointerType::getElementType()
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 01:14:37 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG184591aeeb5a: [OpaquePtrs] Deprecate PointerType::getElementType() (authored by nikic).
Changed prior to commit:
https://reviews.llvm.org/D117885?vs=402538&id=402790#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117885/new/
https://reviews.llvm.org/D117885
Files:
llvm/include/llvm/IR/DerivedTypes.h
Index: llvm/include/llvm/IR/DerivedTypes.h
===================================================================
--- llvm/include/llvm/IR/DerivedTypes.h
+++ llvm/include/llvm/IR/DerivedTypes.h
@@ -667,9 +667,11 @@
unsigned AddressSpace) {
if (PT->isOpaque())
return get(PT->getContext(), AddressSpace);
- return get(PT->getElementType(), AddressSpace);
+ return get(PT->PointeeTy, AddressSpace);
}
+ [[deprecated("Pointer element types are deprecated. You can *temporarily* "
+ "use Type::getPointerElementType() instead")]]
Type *getElementType() const {
assert(!isOpaque() && "Attempting to get element type of opaque pointer");
return PointeeTy;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117885.402790.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/efbd2958/attachment.bin>
More information about the llvm-commits
mailing list