-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)") | ||
| 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); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I'll do that. |
||
| } | ||
|
|
||
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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