Skip to content
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

[NFC] Update from deprecated llvm::Optional #12734

Merged
merged 1 commit into from
Mar 23, 2023
Merged

Conversation

jpienaar
Copy link
Member

@jpienaar jpienaar commented Mar 23, 2023

This is being deprecated in LLVM (https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716). This change was mostly mechanically done via find/ripgrep/sed, with exception of TableGen files which were more complicated (Optional in DAG vs member function or C++ type usage and required checking manually).

Copy link
Contributor

@GMNGeoffrey GMNGeoffrey left a comment

Choose a reason for hiding this comment

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

Can you expand the description. Useful info:

  1. Links to the explanation of the deprecation
  2. How you generated this change
  3. The support status of std::optional. Looks like it's C++17, which we've already bumped to, I think, but I do see some references to C++14 still, e.g. https://github.com/openxla/iree/blob/c6b6aba2e5023c58e2c9fa1ec6607367e23b3022/runtime/src/iree/vm/native_module_packing.h#L21

@jpienaar
Copy link
Member Author

Done, my scripting wasn't the best here so I did a few rounds with manual editing for too broad regex'es.

Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

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

LGTM

Switch to std::optional which is currently an alias.
@jpienaar jpienaar merged commit 6109e0c into iree-org:main Mar 23, 2023
@jpienaar jpienaar mentioned this pull request Apr 3, 2023
jpienaar added a commit that referenced this pull request May 1, 2023
This is being deprecated in LLVM
(https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716).
This change was _mostly_ mechanically done via find/ripgrep/sed, with
exception of TableGen files which were more complicated (Optional in DAG
vs member function or C++ type usage and required checking manually).
NatashaKnk pushed a commit to NatashaKnk/iree that referenced this pull request Jul 6, 2023
This is being deprecated in LLVM
(https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716).
This change was _mostly_ mechanically done via find/ripgrep/sed, with
exception of TableGen files which were more complicated (Optional in DAG
vs member function or C++ type usage and required checking manually).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants