This is an archive of the discontinued LLVM Phabricator instance.

[MLGO] Fix InlineAdvisor and ModelUnderTrainingRunner after hasValue removal
ClosedPublic

Authored by aidengrossman on Nov 23 2022, 7:44 PM.

Details

Summary

Recentlyin 4b6b248, llvm::Optional's hasValue method was removed as
described in
https://discourse.llvm.org/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor
This breaks InlineAdvisor and ModelUnderTrainingRunner. This patch fixes
them by changing the method to has_value, which hasValue was evaluating
to before.

Diff Detail

Event Timeline

aidengrossman created this revision.Nov 23 2022, 7:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 7:44 PM
aidengrossman requested review of this revision.Nov 23 2022, 7:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 7:44 PM

The MLGO builders building dev configurations are currently broken due to this. I'm going to land this patch since it's small and I'm reasonably confident it is correct, just pushing the diff because I'm familiar with the workflow and we can rollback to here in case something does go awry.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 23 2022, 7:48 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.