[PATCH] D95344: [clang][cli] Accept strings instead of options in ImpliedByAnyOf

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 25 04:24:53 PST 2021


jansvoboda11 created this revision.
jansvoboda11 added reviewers: Bigcheese, dexonsmith.
Herald added a subscriber: dang.
jansvoboda11 requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

To be able to use a 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 entity, but we can still use the option.KeyPath syntax to simulate this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95344

Files:
  clang/include/clang/Driver/Options.td
  llvm/include/llvm/Option/OptParser.td
  llvm/unittests/Option/Opts.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95344.318956.patch
Type: text/x-patch
Size: 9726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210125/a5445eff/attachment.bin>


More information about the cfe-commits mailing list