[PATCH] D105948: [llvm-nm] Remove one-dash long options except -arch

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 09:50:49 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG96e9bc424475: [llvm-nm] Remove one-dash long options except -arch (authored by MaskRay).

Changed prior to commit:
  https://reviews.llvm.org/D105948?vs=358456&id=359025#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105948

Files:
  llvm/test/tools/llvm-nm/X86/posix-aliases.test
  llvm/tools/llvm-nm/Opts.td


Index: llvm/tools/llvm-nm/Opts.td
===================================================================
--- llvm/tools/llvm-nm/Opts.td
+++ llvm/tools/llvm-nm/Opts.td
@@ -1,17 +1,16 @@
 include "llvm/Option/OptParser.td"
 
 class F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
-class FF<string name, string help> : Flag<["--", "-"], name>, HelpText<help>;
+class FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
 
 multiclass BB<string name, string help1, string help2> {
-  def NAME: Flag<["--", "-"], name>, HelpText<help1>;
-  def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText<help2>;
+  def NAME: Flag<["--"], name>, HelpText<help1>;
+  def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
 }
 
 multiclass Eq<string name, string help> {
-  def NAME #_EQ : Joined<["--", "-"], name #"=">,
-                  HelpText<help>;
-  def : Separate<["--", "-"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
+  def NAME #_EQ : Joined<["--"], name #"=">, HelpText<help>;
+  def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
 }
 
 def debug_syms : FF<"debug-syms", "Show all symbols, even debugger only">;
@@ -42,7 +41,8 @@
 
 def add_dyldinfo : FF<"add-dyldinfo", "Add symbols from the dyldinfo not already in the symbol table">, Group<grp_mach_o>;
 def add_inlinedinfo : FF<"add-inlinedinfo", "Add symbols from the inlined libraries, TBD only">, Group<grp_mach_o>;
-defm arch : Eq<"arch", "architecture(s) from a Mach-O file to dump">, Group<grp_mach_o>;
+def arch_EQ : Joined<["--"], "arch=">, HelpText<"architecture(s) from a Mach-O file to dump">, Group<grp_mach_o>;
+def : Separate<["--", "-"], "arch">, Alias<arch_EQ>;
 def dyldinfo_only : FF<"dyldinfo-only", "Show only symbols from the dyldinfo">, Group<grp_mach_o>;
 def no_dyldinfo : FF<"no-dyldinfo", "Don't add any symbols from the dyldinfo">, Group<grp_mach_o>;
 def s : F<"s", "Dump only symbols from this segment and section name">, Group<grp_mach_o>;
Index: llvm/test/tools/llvm-nm/X86/posix-aliases.test
===================================================================
--- llvm/test/tools/llvm-nm/X86/posix-aliases.test
+++ llvm/test/tools/llvm-nm/X86/posix-aliases.test
@@ -1,5 +1,5 @@
 # RUN: llvm-nm -P %p/Inputs/hello.obj.elf-x86_64 > %t1
 # RUN: llvm-nm --format=posix %p/Inputs/hello.obj.elf-x86_64 > %t2
-# RUN: llvm-nm -portability %p/Inputs/hello.obj.elf-x86_64 > %t3
+# RUN: llvm-nm --portability %p/Inputs/hello.obj.elf-x86_64 > %t3
 # RUN: diff %t1 %t2
 # RUN: diff %t1 %t3


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105948.359025.patch
Type: text/x-patch
Size: 2512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210715/bf9d623f/attachment.bin>


More information about the llvm-commits mailing list