Opts.td 1.7 KB

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