[PATCH] D80959: [llvm-dwarfdump] Print =<offset> after --debug-* options in help output.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 18:26:14 PDT 2020


MaskRay added a comment.

> Unfortunately this is still suboptimal. What I'd like to have is

You can patch `lib/Support/CommandLine.cpp:1779`:

  --- a/llvm/lib/Support/CommandLine.cpp
  +++ b/llvm/lib/Support/CommandLine.cpp
  @@ -1778,9 +1778,10 @@ void basic_parser_impl::printOptionInfo(const Option &O,
     if (!ValName.empty()) {
       if (O.getMiscFlags() & PositionalEatsArgs) {
         outs() << " <" << getValueStr(O, ValName) << ">...";
  -    } else {
  +    } else if (O.getValueExpectedFlag() == ValueOptional)
  +      outs() << "[=<" << getValueStr(O, ValName) << ">]";
  +    else
         outs() << "=<" << getValueStr(O, ValName) << '>';
  -    }
     }
   
     Option::printHelpStr(O.HelpStr, GlobalWidth, getOptionWidth(O));


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80959/new/

https://reviews.llvm.org/D80959





More information about the llvm-commits mailing list