[PATCH] D78476: [dsymutil] Fix short options displayed in the help message.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 06:56:22 PDT 2020


Higuoxing updated this revision to Diff 260617.
Higuoxing added a comment.

Thanks you @jhenderson and @aprantl, it helps a lot!

--------------------------

Addressed comments.

- Update `cmdline.test` to test this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78476

Files:
  llvm/test/tools/dsymutil/cmdline.test
  llvm/tools/dsymutil/Options.td


Index: llvm/tools/dsymutil/Options.td
===================================================================
--- llvm/tools/dsymutil/Options.td
+++ llvm/tools/dsymutil/Options.td
@@ -44,7 +44,7 @@
   HelpText<"Parse and dump the debug map to standard output. Not DWARF link will take place.">,
   Group<grp_general>;
 
-def yaml_input: F<"y">,
+def yaml_input: Flag<["-", "--"], "y">,
   HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
   Group<grp_general>;
 
@@ -52,7 +52,7 @@
   HelpText<"Embed warnings in the linked DWARF debug info.">,
   Group<grp_general>;
 
-def assembly: F<"S">,
+def assembly: Flag<["-", "--"], "S">,
   HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
   Group<grp_general>;
 
@@ -93,16 +93,16 @@
   HelpText<"Alias for --update">,
   Group<grp_general>;
 
-def output: Separate<["--", "-"], "o">,
+def output: Separate<["-", "--"], "o">,
   MetaVarName<"<filename>">,
   HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
   Group<grp_general>;
 def: Separate<["--", "-"], "out">,
   Alias<output>,
-  HelpText<"Alias for --o">,
+  HelpText<"Alias for -o">,
   Group<grp_general>;
 def: Joined<["--", "-"], "out=">, Alias<output>;
-def: Joined<["--", "-"], "o=">, Alias<output>;
+def: Joined<["-", "--"], "o=">, Alias<output>;
 
 def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
   MetaVarName<"<path>">,
Index: llvm/test/tools/dsymutil/cmdline.test
===================================================================
--- llvm/test/tools/dsymutil/cmdline.test
+++ llvm/test/tools/dsymutil/cmdline.test
@@ -14,17 +14,18 @@
 HELP: -num-threads <threads>
 HELP: -object-prefix-map <prefix=remapped>
 HELP: -oso-prepend-path <path>
-HELP: -o <filename>
+HELP: {{ -o <filename> }}
 HELP: -papertrail
 HELP: -remarks-output-format <format>
 HELP: -remarks-prepend-path <path>
 HELP: -symbol-map
 HELP: -symtab
+HELP: {{ -S }}
 HELP: -toolchain
 HELP: -update
 HELP: -verbose
 HELP: -verify
-HELP: -y
+HELP: {{ -y }}
 HELP-NOT: -reverse-iterate
 
 RUN: dsymutil --version 2>&1 | FileCheck --check-prefix=VERSION %s


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78476.260617.patch
Type: text/x-patch
Size: 2126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/57a4850f/attachment.bin>


More information about the llvm-commits mailing list