[PATCH] D53983: [llvm-objcopy] For multiclass Eq, associate help text with --name= , not --name

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 10:26:39 PDT 2018


rupprecht added a comment.

--help is getting to the point where it might be clean enough to write a test for :)



================
Comment at: tools/llvm-objcopy/ObjcopyOpts.td:10
 def help : Flag<["-", "--"], "help">;
-defm binary_architecture : Eq<"binary-architecture">,
-                           HelpText<"Used when transforming an architecture-less format (such as binary) to another format">;
+defm binary_architecture : Eq<"binary-architecture", "Used when transforming an architecture-less format (such as binary) to another format">;
 def B : JoinedOrSeparate<["-"], "B">,
----------------
jhenderson wrote:
> Might be worth on some of these long lines to break it over two lines, e.g:
> 
> ```
> defm binary_architecture : Eq<"binary-architecture",
>   "Used when transforming an architecture-less format (such as binary) to another format">;
> ```
> or similar. Not sure about the indentation of the second line.
FWIW, I've been looking at making clang-format deal with tablegen better so this can be automated. clang-format knows how to break this up but it gets gnarly because it doesn't deal with line breaks well.

D53952 (but I have one more local change that I need to upload to make it deal with ["-", "--"] spacing)


Repository:
  rL LLVM

https://reviews.llvm.org/D53983





More information about the llvm-commits mailing list