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