[llvm] [llvm-support][llvm-profdata] Use cl::Subcommand to organize show options. And look up in top-level as a fallback if a special subcommand doesn't have an option. (PR #71328)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 10:07:10 PST 2023


minglotus-6 wrote:

> Since the options are now attached to ShowSubCommand, there is no longer the need to use show_options namespace.

Different subcommand could have `cl::opt` variables of the same name. While `cl::SubCommand` could put registered option strings in a sub-command "namespace", , the `cl::opt` variables are put in per-subcommand namespaces.

https://github.com/llvm/llvm-project/pull/71328


More information about the llvm-commits mailing list