[llvm] 146ad71 - [IR] Deprecate PointerType::get/getUnqual pointee type overload (#134517)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 6 16:30:36 PDT 2025
Author: Mats Jun Larsen
Date: 2025-04-06T23:30:33Z
New Revision: 146ad71bc71a9cbecccea307bbd157ec910ae82a
URL: https://github.com/llvm/llvm-project/commit/146ad71bc71a9cbecccea307bbd157ec910ae82a
DIFF: https://github.com/llvm/llvm-project/commit/146ad71bc71a9cbecccea307bbd157ec910ae82a.diff
LOG: [IR] Deprecate PointerType::get/getUnqual pointee type overload (#134517)
Deprecates the methods and schedules them for removal in the future as
the overloads taking LLVMContext are preferred, as the pointee type
has no meaning in opaque pointers.
>From what my clangd can tell, there are no usages left in the monorepo
Part of #123569
Added:
Modified:
llvm/include/llvm/IR/DerivedTypes.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h
index 60606d34c32c3..ba5c41ff033f5 100644
--- a/llvm/include/llvm/IR/DerivedTypes.h
+++ b/llvm/include/llvm/IR/DerivedTypes.h
@@ -685,6 +685,8 @@ class PointerType : public Type {
/// This constructs a pointer to an object of the specified type in a numbered
/// address space.
+ [[deprecated("PointerType::get with pointee type is pending removal. Use "
+ "Context overload.")]]
static PointerType *get(Type *ElementType, unsigned AddressSpace);
/// This constructs an opaque pointer to an object in a numbered address
/// space.
@@ -692,6 +694,8 @@ class PointerType : public Type {
/// This constructs a pointer to an object of the specified type in the
/// default address space (address space zero).
+ [[deprecated("PointerType::getUnqual with pointee type is pending removal. "
+ "Use Context overload.")]]
static PointerType *getUnqual(Type *ElementType) {
return PointerType::get(ElementType, 0);
}
More information about the llvm-commits
mailing list