[all-commits] [llvm/llvm-project] 9338f3: [clang][cli] Accept strings instead of options in ...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Tue Jan 26 00:36:10 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9338f3a586bcebc6843ff7fe745f311d7ddf4908
      https://github.com/llvm/llvm-project/commit/9338f3a586bcebc6843ff7fe745f311d7ddf4908
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M llvm/include/llvm/Option/OptParser.td
    M llvm/unittests/Option/Opts.td

  Log Message:
  -----------
  [clang][cli] Accept strings instead of options in ImpliedByAnyOf

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.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D95344




More information about the All-commits mailing list