This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Deprecate OptionalParseResult::{hasValue,getValue}
ClosedPublic

Authored by kazu on Aug 7 2022, 12:04 PM.

Details

Summary

This patch deprecates hasValue and getValue for consistency with
std::optional and llvm::Optional. Note that I've migrated all known
uses of them to has_value and value, respectively.

Diff Detail

Event Timeline

kazu created this revision.Aug 7 2022, 12:04 PM
Herald added a project: Restricted Project. · View Herald Transcript
kazu requested review of this revision.Aug 7 2022, 12:04 PM
kazu updated this revision to Diff 451004.Aug 8 2022, 5:02 PM

Updated to use LLVM_DEPRECATED instead of [[deprecated]].

kazu added a comment.Aug 8 2022, 5:02 PM

PTAL. Thanks!

How bad would it be just to remove uses of these methods? It'd be nice to avoid the intermediate warning spam that comes along with these.

Ah, I see the comment says you removed all known uses. What is the removal timeline for these methods?

kazu added a comment.Aug 11 2022, 10:33 AM

Ah, I see the comment says you removed all known uses. What is the removal timeline for these methods?

I am thinking about 3 months or so to accommodate downstream users and other patches landing nearly at the same time.

rriddle accepted this revision.Aug 12 2022, 12:39 PM

Ah, I see the comment says you removed all known uses. What is the removal timeline for these methods?

I am thinking about 3 months or so to accommodate downstream users and other patches landing nearly at the same time.

That seems like a huge lead time for something not really heavily used. I'd honestly rather remove it earlier than that, but LGTM for marking it for now.

This revision is now accepted and ready to land.Aug 12 2022, 12:39 PM
This revision was automatically updated to reflect the committed changes.