Opts.td 1.2 KB

1234567891011121314151617181920212223
  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 all : FF<"all", "Silently ignored. Present for GNU strings compatibility">;
  10. defm bytes : Eq<"bytes", "Print sequences of the specified length">;
  11. def help : FF<"help", "Display this help">;
  12. def print_file_name : Flag<["--"], "print-file-name">, HelpText<"Print the name of the file before each string">;
  13. defm radix : Eq<"radix", "Print the offset within the file with the specified radix: o (octal), d (decimal), x (hexadecimal)">, MetaVarName<"<radix>">;
  14. def version : FF<"version", "Display the version">;
  15. def : F<"a", "Alias for --all">, Alias<all>;
  16. def : F<"f", "Alias for --print-file-name">, Alias<print_file_name>;
  17. def : F<"h", "Alias for --help">, Alias<help>;
  18. def : JoinedOrSeparate<["-"], "n">, Alias<bytes_EQ>, HelpText<"Alias for --bytes">;
  19. def : JoinedOrSeparate<["-"], "t">, Alias<radix_EQ>, HelpText<"Alias for --radix">, MetaVarName<"<radix>">;