xref: /llvm-project/llvm/tools/llvm-strings/Opts.td (revision 98f078324fc51da460660920f4a1aa308bfc3547)
1*98f07832SFangrui Songinclude "llvm/Option/OptParser.td"
2*98f07832SFangrui Song
3*98f07832SFangrui Songclass F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
4*98f07832SFangrui Songclass FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
5*98f07832SFangrui Song
6*98f07832SFangrui Songmulticlass Eq<string name, string help> {
7*98f07832SFangrui Song  def NAME #_EQ : Joined<["--"], name #"=">,
8*98f07832SFangrui Song                  HelpText<help>;
9*98f07832SFangrui Song  def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
10*98f07832SFangrui Song}
11*98f07832SFangrui Song
12*98f07832SFangrui Songdef all : FF<"all", "Silently ignored. Present for GNU strings compatibility">;
13*98f07832SFangrui Songdefm bytes : Eq<"bytes", "Print sequences of the specified length">;
14*98f07832SFangrui Songdef help : FF<"help", "Display this help">;
15*98f07832SFangrui Songdef print_file_name : Flag<["--"], "print-file-name">, HelpText<"Print the name of the file before each string">;
16*98f07832SFangrui Songdefm radix : Eq<"radix", "Print the offset within the file with the specified radix: o (octal), d (decimal), x (hexadecimal)">, MetaVarName<"<radix>">;
17*98f07832SFangrui Songdef version : FF<"version", "Display the version">;
18*98f07832SFangrui Song
19*98f07832SFangrui Songdef : F<"a", "Alias for --all">, Alias<all>;
20*98f07832SFangrui Songdef : F<"f", "Alias for --print-file-name">, Alias<print_file_name>;
21*98f07832SFangrui Songdef : F<"h", "Alias for --help">, Alias<help>;
22*98f07832SFangrui Songdef : JoinedOrSeparate<["-"], "n">, Alias<bytes_EQ>, HelpText<"Alias for --bytes">;
23*98f07832SFangrui Songdef : JoinedOrSeparate<["-"], "t">, Alias<radix_EQ>, HelpText<"Alias for --radix">, MetaVarName<"<radix>">;
24