[llvm] [IR] Deprecate PointerType::get/getUnqual pointee type overload (PR #134517)

Mats Jun Larsen via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 03:54:20 PDT 2025


================
@@ -685,13 +685,17 @@ 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.
   static PointerType *get(LLVMContext &C, unsigned AddressSpace);
 
   /// 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);
----------------
junlarsen wrote:

Sure, I'll do that.

https://github.com/llvm/llvm-project/pull/134517


More information about the llvm-commits mailing list