[llvm] [CommandLine] Add subcommand groups (PR #75678)

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 13:29:02 PST 2023


igorkudrin wrote:

> I assume you have a concrete use case for this in mind?

A tool can have options like 'input files", "output file", "log", etc. that are shared by all/most of its subcommands. At the same time, it is not possible to use a pseudo-subcommand `cl::AllSubCommands`, because the options make no sense if the tool is called without any subcommand specified. We use the subcommand groups for our downstream tool, and this helps to simplify the code a bit.

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


More information about the llvm-commits mailing list