[PATCH] D51009: [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and don't append "[options] <inputs>"

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 17:28:11 PDT 2018


jakehehrlich added a comment.

In https://reviews.llvm.org/D51009#1259745, @MaskRay wrote:

> .


Please don't remove subscribers like this. People setup Herald rules to make sure they're notified of any changes. Also, are you sure you've added all the needed reviewers for this? This is touching a lot of tools and this is not really the diverse group of reviewers I'd expect to give the ok on this sort of stuff.

The intent of this change seems non-offensive to me and I'm generically fine with it.

Also "<inputs>" seems better than "files..." to me.



================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:900
   if (InputArgs.size() == 0) {
-    T.PrintHelp(errs(), "llvm-objcopy <input> [ <output> ]", "objcopy tool");
+    T.PrintHelp(errs(), "llvm-objcopy input [output]", "objcopy tool");
     exit(1);
----------------
rupprecht wrote:
> extract this to a static const char[] like for strip below
Maybe we should add "[options]" before "input"

Also, I think I'd prefer "<input>" to "input"


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:1042
 
+  static const char Usage[] = "llvm-strip [options] file...";
   if (InputArgs.size() == 0) {
----------------
I'd prefer "<inputs>" to "file..."


Repository:
  rL LLVM

https://reviews.llvm.org/D51009





More information about the llvm-commits mailing list