1 include "llvm/Option/OptParser.td"
3 class F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
4 class FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
6 multiclass Eq<string name, string help> {
7 def NAME #_EQ : Joined<["--"], name #"=">,
9 def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
12 def common : FF<"common", "Print common symbols in the ELF file. When using Berkeley format, this is added to bss">;
13 defm format : Eq<"format", "Specify output format">;
14 def help : FF<"help", "Display this help">;
15 defm radix : Eq<"radix", "Print size in radix">;
16 def totals : FF<"totals", "Print totals of all objects - Berkeley format only">;
17 def version : FF<"version", "Display the version">;
19 // Mach-O specific options.
20 def grp_mach_o : OptionGroup<"kind">, HelpText<"OPTIONS (Mach-O specific)">;
21 def arch_EQ : Joined<["--"], "arch=">, HelpText<"architecture(s) from a Mach-O file to dump">, Group<grp_mach_o>;
22 def : Separate<["--", "-"], "arch">, Alias<arch_EQ>;
23 def l : F<"l", "When format is darwin, use long format to include addresses and offsets">, Group<grp_mach_o>;
25 def : F<"A", "Alias for --format">, Alias<format_EQ>, AliasArgs<["sysv"]>;
26 def : F<"B", "Alias for --format">, Alias<format_EQ>, AliasArgs<["berkeley"]>;
27 def : F<"d", "Alias for --radix=10">, Alias<radix_EQ>, AliasArgs<["10"]>;
28 def : F<"h", "Alias for --help">, Alias<help>;
29 def : F<"m", "Alias for --format">, Alias<format_EQ>, AliasArgs<["darwin"]>;
30 def : F<"o", "Alias for --radix=8">, Alias<radix_EQ>, AliasArgs<["8"]>;
31 def : F<"t", "Alias for --totals">, Alias<totals>;
32 def : F<"x", "Alias for --radix=16">, Alias<radix_EQ>, AliasArgs<["16"]>;