Index: llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td =================================================================== --- llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td +++ llvm/trunk/tools/llvm-objcopy/ObjcopyOpts.td @@ -1,25 +1,24 @@ include "llvm/Option/OptParser.td" -multiclass Eq { +multiclass Eq { def NAME: Separate<["--", "-"], name>; - def NAME # _eq: Joined<["--", "-"], name # "=">, Alias(NAME)>; + def NAME # _eq: Joined<["--", "-"], name # "=">, Alias(NAME)>, + HelpText; } 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">, Alias; -defm target : Eq<"target">, - HelpText<"Format of the input and output file">, +defm target : Eq<"target", "Format of the input and output file">, Values<"binary">; def F : JoinedOrSeparate<[ "-" ], "F">, Alias; -defm input_target : Eq<"input-target">, - HelpText<"Format of the input file">, +defm input_target : Eq<"input-target", "Format of the input file">, Values<"binary">; def I : JoinedOrSeparate<[ "-" ], "I">, Alias; -defm output_target : Eq<"output-target">, - HelpText<"Format of the output file">, +defm output_target : Eq<"output-target", "Format of the output file">, Values<"binary">; def compress_debug_sections : Flag<["--", "-"], "compress-debug-sections">; def compress_debug_sections_eq : Joined<["--", "-"], "compress-debug-sections=">, @@ -31,44 +30,40 @@ HelpText<"Decompress DWARF debug sections.">; def O : JoinedOrSeparate<["-"], "O">, Alias; -defm split_dwo : Eq<"split-dwo">, - MetaVarName<"dwo-file">, - HelpText<"Equivalent to extract-dwo on the input file to , then strip-dwo on the input file">; +defm split_dwo + : Eq<"split-dwo", "Equivalent to extract-dwo on the input file to " + ", then strip-dwo on the input file">, + MetaVarName<"dwo-file">; def preserve_dates : Flag<[ "-", "--" ], "preserve-dates">, HelpText<"Preserve access and modification timestamps">; def p : Flag<[ "-" ], "p">, Alias; -defm add_gnu_debuglink : Eq<"add-gnu-debuglink">, - MetaVarName<"debug-file">, - HelpText<"Add a .gnu_debuglink for ">; -defm remove_section : Eq<"remove-section">, - MetaVarName<"section">, - HelpText<"Remove
">; +defm add_gnu_debuglink : Eq<"add-gnu-debuglink", "Add a .gnu_debuglink for ">, + MetaVarName<"debug-file">; +defm remove_section : Eq<"remove-section", "Remove
">, + MetaVarName<"section">; defm rename_section - : Eq<"rename-section">, - MetaVarName<"old=new[,flag1,...]">, - HelpText< - "Renames a section from old to new, optionally with specified flags. " - "Flags supported for GNU compatibility: alloc, load, noload, " - "readonly, debug, code, data, rom, share, contents, merge, strings.">; -defm redefine_symbol : Eq<"redefine-sym">, - MetaVarName<"old=new">, - HelpText<"Change the name of a symbol old to new">; + : Eq<"rename-section", + "Renames a section from old to new, optionally with specified flags. " + "Flags supported for GNU compatibility: alloc, load, noload, " + "readonly, debug, code, data, rom, share, contents, merge, strings.">, + MetaVarName<"old=new[,flag1,...]">; +defm redefine_symbol : Eq<"redefine-sym", "Change the name of a symbol old to new">, + MetaVarName<"old=new">; def R : JoinedOrSeparate<["-"], "R">, Alias; -defm keep : Eq<"keep">, - MetaVarName<"section">, - HelpText<"Keep
">; -defm only_keep : Eq<"only-keep">, - MetaVarName<"section">, - HelpText<"Remove all but
">; +defm keep : Eq<"keep", "Keep
">, + MetaVarName<"section">; +defm only_keep : Eq<"only-keep", "Remove all but
">, + MetaVarName<"section">; def j : JoinedOrSeparate<["-"], "j">, Alias; -defm add_section : Eq<"add-section">, - MetaVarName<"section=file">, - HelpText<"Make a section named
with the contents of .">; +defm add_section + : Eq<"add-section", + "Make a section named
with the contents of .">, + MetaVarName<"section=file">; def strip_all : Flag<["-", "--"], "strip-all">, HelpText<"Remove non-allocated sections other than .gnu.warning* sections">; def S : Flag<["-"], "S">, @@ -87,38 +82,33 @@ HelpText<"Remove all sections that are not DWARF .dwo sections from file">; def localize_hidden : Flag<["-", "--"], "localize-hidden">, HelpText<"Mark all symbols that have hidden or internal visibility as local">; -defm localize_symbol : Eq<"localize-symbol">, - MetaVarName<"symbol">, - HelpText<"Mark as local">; +defm localize_symbol : Eq<"localize-symbol", "Mark as local">, + MetaVarName<"symbol">; def L : JoinedOrSeparate<["-"], "L">, Alias; -defm globalize_symbol : Eq<"globalize-symbol">, - MetaVarName<"symbol">, - HelpText<"Mark as global">; +defm globalize_symbol : Eq<"globalize-symbol", "Mark as global">, + MetaVarName<"symbol">; defm keep_global_symbol - : Eq<"keep-global-symbol">, - MetaVarName<"symbol">, - HelpText<"Convert all symbols except to local. May be repeated " - "to convert all except a set of symbols to local.">; + : Eq<"keep-global-symbol", "Convert all symbols except to local. May be repeated " + "to convert all except a set of symbols to local.">, + MetaVarName<"symbol">; def G : JoinedOrSeparate<[ "-" ], "G">, Alias; defm keep_global_symbols - : Eq<"keep-global-symbols">, - MetaVarName<"filename">, - HelpText< - "Reads a list of symbols from and runs as if " - "--keep-global-symbol= is set for each one. " - "contains one symbol per line and may contain comments beginning " - "with '#'. Leading and trailing whitespace is stripped from each " - "line. May be repeated to read symbols from many files.">; + : Eq<"keep-global-symbols", + "Reads a list of symbols from and runs as if " + "--keep-global-symbol= is set for each one. " + "contains one symbol per line and may contain comments beginning " + "with '#'. Leading and trailing whitespace is stripped from each " + "line. May be repeated to read symbols from many files.">, + MetaVarName<"filename">; def version : Flag<[ "-", "--" ], "version">, HelpText<"Print the version and exit.">; -defm weaken_symbol : Eq<"weaken-symbol">, - MetaVarName<"symbol">, - HelpText<"Mark as weak">; +defm weaken_symbol : Eq<"weaken-symbol", "Mark as weak">, + MetaVarName<"symbol">; def W : JoinedOrSeparate<["-"], "W">, Alias; def weaken : Flag<["-", "--"], "weaken">, @@ -127,14 +117,12 @@ HelpText<"Remove all local symbols except file and section symbols">; def x : Flag<["-"], "x">, Alias; -defm strip_symbol : Eq<"strip-symbol">, - MetaVarName<"symbol">, - HelpText<"Remove symbol ">; +defm strip_symbol : Eq<"strip-symbol", "Remove symbol ">, + MetaVarName<"symbol">; def N : JoinedOrSeparate<["-"], "N">, Alias; -defm keep_symbol : Eq<"keep-symbol">, - MetaVarName<"symbol">, - HelpText<"Do not remove symbol ">; +defm keep_symbol : Eq<"keep-symbol", "Do not remove symbol ">, + MetaVarName<"symbol">; def K : JoinedOrSeparate<["-"], "K">, Alias; def only_keep_debug : Flag<["-", "--"], "only-keep-debug">, @@ -143,9 +131,7 @@ HelpText<"Remove all symbols not needed by relocations">; def keep_file_symbols : Flag<["-", "--"], "keep-file-symbols">, HelpText<"Do not remove file symbols">; -defm dump_section : Eq<"dump-section">, - MetaVarName<"section=file">, - HelpText<"Dump contents of section named
into file ">; -defm prefix_symbols : Eq<"prefix-symbols">, - MetaVarName<"prefix">, - HelpText<"Add to the start of every symbol name">; +defm dump_section : Eq<"dump-section", "Dump contents of section named
into file ">, + MetaVarName<"section=file">; +defm prefix_symbols : Eq<"prefix-symbols", "Add to the start of every symbol name">, + MetaVarName<"prefix">; Index: llvm/trunk/tools/llvm-objcopy/StripOpts.td =================================================================== --- llvm/trunk/tools/llvm-objcopy/StripOpts.td +++ llvm/trunk/tools/llvm-objcopy/StripOpts.td @@ -1,15 +1,15 @@ include "llvm/Option/OptParser.td" -multiclass Eq { +multiclass Eq { def NAME: Separate<["--", "-"], name>; - def NAME # _eq: Joined<["--", "-"], name # "=">, Alias(NAME)>; + def NAME # _eq: Joined<["--", "-"], name # "=">, Alias(NAME)>, + HelpText; } def help : Flag<["-", "--"], "help">; -defm output : Eq<"o">, - MetaVarName<"output">, - HelpText<"Write output to ">; +defm output : Eq<"o", "Write output to ">, + MetaVarName<"output">; def preserve_dates : Flag<[ "-", "--" ], "preserve-dates">, HelpText<"Preserve access and modification timestamps">; @@ -34,16 +34,14 @@ def S : Flag<["-"], "S">, Alias; -defm remove_section : Eq<"remove-section">, - MetaVarName<"section">, - HelpText<"Remove
">; +defm remove_section : Eq<"remove-section", "Remove
">, + MetaVarName<"section">; def R : JoinedOrSeparate<["-"], "R">, Alias; -defm keep_symbol : Eq<"keep-symbol">, - MetaVarName<"symbol">, - HelpText<"Do not remove symbol ">; +defm keep_symbol : Eq<"keep-symbol", "Do not remove symbol ">, + MetaVarName<"symbol">; def K : JoinedOrSeparate<["-"], "K">, Alias;