[PATCH] D156741: [IR] Deprecate some old methods for getting typed pointer types
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 14:49:49 PDT 2023
bjope added inline comments.
================
Comment at: llvm/include/llvm/IR/Type.h:491
+ [[deprecated("Pointers no longer have element types")]]
+ inline PointerType *getHalfPtrTy(LLVMContext &C, unsigned AS = 0) {
+ return getInt8PtrTy(C, AS);
----------------
aeubanks wrote:
> these are no longer static, that looks unintentional. probably nobody is using these anymore because they're not static, might as well just remove them or make them static again
Since all of them are doing the same thing I made these unused versions inline wrappers of getInt8PtrTy (which still is static).
And for the "To enforce that no two equal instances are created" part I think the important thing is that PointerType::get is static, or am I missing something?
@aeubanks : I'm not sure I understand how it is a problem that they aren't static?
(But I'm not sure we need to keep lots of deprecated methods. Not much difference really in getting a Wdeprecated warning or a failed compilation due to a missing function, at least not if building with Werror.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156741/new/
https://reviews.llvm.org/D156741
More information about the llvm-commits
mailing list