[llvm] [IR] Deprecate PointerType::get/getUnqual pointee type overload (PR #134517)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 03:37:09 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);
----------------
RKSimon wrote:
@junlarsen MSVC is warning because this is calling the now deprecated llvm.PointerType.get() variant - would it be possible for you to update this to call the LLVMContext variant directly to silence the warning and allow us to re-enable Werror builds pleaSE?
https://github.com/llvm/llvm-project/pull/134517
More information about the llvm-commits
mailing list