[OptTable] Refine how `printHelp` treats empty help texts
authorAndrzej Warzynski <andrzej.warzynski@arm.com>
Thu, 5 Aug 2021 11:42:30 +0000 (11:42 +0000)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Thu, 19 Aug 2021 09:30:15 +0000 (09:30 +0000)
commitdcc6b7b1d5e5a0f9537ce1bf919ac2338bd7ad7b
treeed2da2f046028b53b2d9daf6c7dce23bfae042dd
parentcc3affd8b02091bf475f9dd083802e1b6a232be1
[OptTable] Refine how `printHelp` treats empty help texts

Currently, `printHelp` behaves differently for options that:
  * do not define `HelpText` (such options _are not printed_), and
  * define its `HelpText` as `HelpText<"">` (such options _are printed_).
In practice, both approaches lead to no help text and `printHelp` should
treat them consistently. This patch addresses that by making
`printHelpt` check the length of the help text to be printed.

All affected tests have been updated accordingly. The option definitions
for llvm-cvtres have been updated with a short description or "Not
  implemented" for options that are ignored by the tool.

Differential Revision: https://reviews.llvm.org/D107557
flang/test/Driver/driver-help-hidden.f90
flang/test/Driver/driver-help.f90
llvm/lib/Option/OptTable.cpp
llvm/test/tools/llvm-cvtres/help.test
llvm/tools/llvm-cvtres/Opts.td