Skip to content
Merged
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions llvm/include/llvm/IR/DerivedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,13 +685,19 @@ class PointerType : public Type {

/// This constructs a pointer to an object of the specified type in a numbered
/// address space.
LLVM_DEPRECATED("PointerType::get with pointee type is pending removal. Use "
"Context overload.",
"PointerType::get(LLVMContext, AS)")
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use [[deprecated]] instead. Only use LLVM_DEPRECATED if you can actually provide a working fixit, which you can't do here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the heads up! Taken care of in b3c03d6

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).
LLVM_DEPRECATED("PointerType::getUnqual with pointee type is pending "
"removal. Use Context overload.",
"PointerType::getUnqual(LLVMCOntext)")
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