[llvm] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 16:56:19 PST 2023


minglotus-6 wrote:

To ensure options are not deleted mistakenly, I run `llvm-profdata <subcommand> --help` with and without the patch, and got the diff links [1].  Two kinds of options are gone in emitted message with this patch, which I think is benign.
1) `--version` is not in `--help` message. note `llvm-profdata --version` still works but doesn't emit `llvm-profdata` anymore (see updated regression test)
2) Options that are not defined in `llvm-profdata.cpp` before this patch.  {disable-i2p-p2i-opt, disable-auto-upgrade-debug-info, enable-name-compression, generate-merged-base-profiles} are defined in dependent libraries.  `experimental-debuginfo-iterators` is shown before but I didn't see where this option is defined in the llvm-repo, so consider this fine.

[1] 
- order https://www.diffchecker.com/UokTAyYJ/
- overlap https://www.diffchecker.com/wO2rICsW/
- merge https://www.diffchecker.com/QyXCBpBO/
- show https://www.diffchecker.com/PKPMcPRB/

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


More information about the llvm-commits mailing list