[llvm] [CommandLine] Set the 'ValueStr' with the selected argument (PR #90816)

Bill Wendling via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 12:37:07 PDT 2024


bwendling wrote:

> My understanding is that `ValueStr` is just an implementation detail to support the `cl::value_desc` modifier, as in
> 
> ```
> static cl::opt<std::string> OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename"));
> ```
> 
> which result in
> 
> ```
> > tool --help
>   -o <filename>  - Output filename
> ```
> 
> It would not be correct to reuse the same member for another purpose.

Crumbs! Okay, I was mistaken. I think that Python calls this `metavar`, which I personally believe is clearer (but won't press the issue). Anyway, I'll close this PR. Thank you for the review.

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


More information about the llvm-commits mailing list