Skip to content

[IR] Deprecate PointerType::get/getUnqual pointee type overload #134517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions llvm/include/llvm/IR/DerivedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Collaborator

@RKSimon RKSimon Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll do that.

}
Expand Down