[PATCH] D117870: [OpaquePtrs] Add getNonOpaquePointerElementType() method
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 21 03:55:28 PST 2022
nikic created this revision.
nikic added a reviewer: opaque-pointers.
Herald added subscribers: dexonsmith, hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This method is intended for use in places that cannot be reached with opaque pointers, or part of deprecated methods. This makes it easier to see that some uses of getPointerElementType() don't need further action.
I would also like to deprecate `PointerType::getElementType()` in favor of `Type::getPointerElementType()` in a followup. The `PointerType::getElementType()` method is annoying in that you cannot see at a glance whether this is actually accessing a pointer element type, a vector element type or an array element type. I'd like to reduce our TODO list to `grep getPointerElementType`.
https://reviews.llvm.org/D117870
Files:
llvm/include/llvm/IR/Type.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/IR/Core.cpp
llvm/lib/Transforms/Coroutines/Coroutines.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117870.401930.patch
Type: text/x-patch
Size: 7633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220121/145e97aa/attachment.bin>
More information about the llvm-commits
mailing list