[PATCH] D47588: Print out "Alias for -foo" instead of repeating the same help message for -foo.

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 07:25:06 PDT 2018


bd1976llvm added a comment.

Hi Rui,

I made a mistake when writing out the help text for one of our aliased options (local to our downstream port of lld) whilst merging in this change. It would be nice if we didn't have to write out the help text for aliased options.

I suggest:

- We change OptTable::PrintHelp[lvm\lib\Option\OptTable.cpp] to take an additional parameter that specifies the behaviour when no help text has been specified for an aliased option:
  1. Copy the help text from the aliased option
  2. Print "Alias for " + Alias.getPrefixedName ()
- We remove help text for all aliased options in lld and specify behaviour 2. above when creating our options parser.

What do you think?


Repository:
  rL LLVM

https://reviews.llvm.org/D47588





More information about the llvm-commits mailing list