[llvm] [nfc][llvm-profdata]Refactor llvm-profdata show* code, by moving function-scope options to a show_llvmprofdata namespace (PR #71328)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 13:48:29 PST 2023


minglotus-6 wrote:

> Better put the options into its own name space "namespace show_options {}. In the follow up patch, options for other commands can be done similarly.

Sounds good. (Learnt from failed error message) I should probably register `show` of `llvm-profdata show` as a subcommand, and make the show options associated with this subcommand (something like this example https://github.com/llvm/llvm-project/blob/c2ad9f8b607931430e86da7420493599c48e62a0/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp#L163);

Without that, I'm getting runtime registration errors `Option 'output' registered more than once!` when extracting `output` option out of a per-function scope.

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


More information about the llvm-commits mailing list