[PATCH] D70620: [CommandLine] Add cl::implies option attribute

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 23:37:53 PST 2019


serge-sans-paille added inline comments.


================
Comment at: llvm/include/llvm/Support/CommandLine.h:289
   SmallPtrSet<SubCommand *, 1> Subs; // The subcommands this option belongs to.
+  Option *ImpliedOption = nullptr;
 
----------------
Why limiting to a single ImpliedOption? It could be a list of implied options?


================
Comment at: llvm/include/llvm/Support/CommandLine.h:1364
+
+  // setImplied is only supported for enabling boolean options.
+  template <typename T, typename std::enable_if<std::is_same<T, bool>::value,
----------------
Why limiting that top boolean? You could pass a callback that does extra processing based on the set value?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70620/new/

https://reviews.llvm.org/D70620





More information about the llvm-commits mailing list