diff --git a/test/tools/llvm-nm/X86/posix-aliases.test b/test/tools/llvm-nm/X86/posix-aliases.test index 71b05e507fb..78b1b21de1c 100644 --- a/test/tools/llvm-nm/X86/posix-aliases.test +++ b/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 diff --git a/tools/llvm-nm/Opts.td b/tools/llvm-nm/Opts.td index 649fe7a9b67..3a790890909 100644 --- a/tools/llvm-nm/Opts.td +++ b/tools/llvm-nm/Opts.td @@ -1,17 +1,16 @@ include "llvm/Option/OptParser.td" class F : Flag<["-"], letter>, HelpText; -class FF : Flag<["--", "-"], name>, HelpText; +class FF : Flag<["--"], name>, HelpText; multiclass BB { - def NAME: Flag<["--", "-"], name>, HelpText; - def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText; + def NAME: Flag<["--"], name>, HelpText; + def no_ # NAME: Flag<["--"], "no-" # name>, HelpText; } multiclass Eq { - def NAME #_EQ : Joined<["--", "-"], name #"=">, - HelpText; - def : Separate<["--", "-"], name>, Alias(NAME #_EQ)>; + def NAME #_EQ : Joined<["--"], name #"=">, HelpText; + def : Separate<["--"], name>, Alias(NAME #_EQ)>; } def debug_syms : FF<"debug-syms", "Show all symbols, even debugger only">; @@ -42,7 +41,8 @@ def grp_mach_o : OptionGroup<"kind">, HelpText<"llvm-nm Mach-O Specific Options" def add_dyldinfo : FF<"add-dyldinfo", "Add symbols from the dyldinfo not already in the symbol table">, Group; def add_inlinedinfo : FF<"add-inlinedinfo", "Add symbols from the inlined libraries, TBD only">, Group; -defm arch : Eq<"arch", "architecture(s) from a Mach-O file to dump">, Group; +def arch_EQ : Joined<["--"], "arch=">, HelpText<"architecture(s) from a Mach-O file to dump">, Group; +def : Separate<["--", "-"], "arch">, Alias; def dyldinfo_only : FF<"dyldinfo-only", "Show only symbols from the dyldinfo">, Group; def no_dyldinfo : FF<"no-dyldinfo", "Don't add any symbols from the dyldinfo">, Group; def s : F<"s", "Dump only symbols from this segment and section name">, Group;