[PATCH] D57030: [CommandLine] Don't print empty sentinel values from EnumValN lists in help text
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 23 08:23:03 PST 2019
jhenderson added a comment.
In D57030#1367818 <https://reviews.llvm.org/D57030#1367818>, @thopre wrote:
> I like this new version very much. I agree, <empty> is less likely to be confusing. One last nit: why do you check for the description being empty when deciding to skip an empty value for a ValueOptional option in the second block but not in the first block? Any reason for the inconsistency?
It wasn't intentional, but I think it is okay (although I could be persuaded to do something different). As things stand, an empty string with help text would produce something like this for a ValueOptional option:
-mhvx - Enable Hexagon Vector eXtensions
-mhvx=<value> - Enable Hexagon Vector eXtensions
=v60 - Build for HVX v60
=v62 - Build for HVX v62
=v65 - Build for HVX v65
=v66 - Build for HVX v66
=<empty> - Same as v66
We could instead suppress the =<empty> line always (even if it has a description), or we could always print the =<empty> line regardless of whether it has a description or not, I don't mind.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57030/new/
https://reviews.llvm.org/D57030
More information about the llvm-commits
mailing list