This is an archive of the discontinued LLVM Phabricator instance.

[clang][cli] Accept strings instead of options in ImpliedByAnyOf
ClosedPublic

Authored by jansvoboda11 on Jan 25 2021, 4:24 AM.

Details

Summary

To be able to refer to constant keypaths (e.g. defvar cplusplus = LangOpts<"CPlusPlus">) inside ImpliedByAnyOf, let's accept strings instead of Option instances.

This somewhat weakens the guarantees that we're referring to an existing (option) record, but we can still use the option.KeyPath syntax to simulate this.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jan 25 2021, 4:24 AM
jansvoboda11 requested review of this revision.Jan 25 2021, 4:24 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 25 2021, 4:24 AM
jansvoboda11 edited the summary of this revision. (Show Details)Jan 25 2021, 8:28 AM
jansvoboda11 edited the summary of this revision. (Show Details)
dexonsmith accepted this revision.Jan 25 2021, 11:51 AM

LGTM.

This somewhat weakens the guarantees that we're referring to an existing (option) record, but we can still use the option.KeyPath syntax to simulate this.

I agree that using <option>.KeyPath is sufficient to enforce ordering.

This revision is now accepted and ready to land.Jan 25 2021, 11:51 AM
This revision was landed with ongoing or failed builds.Jan 26 2021, 12:30 AM
This revision was automatically updated to reflect the committed changes.