]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/llvm/tools/llvm-strings/Opts.td
zfs: merge openzfs/zfs@86783d7d9 (zfs-2.1-release) into stable/13
[FreeBSD/FreeBSD.git] / contrib / llvm-project / llvm / tools / llvm-strings / Opts.td
1 include "llvm/Option/OptParser.td"
2
3 class F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
4 class FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
5
6 multiclass Eq<string name, string help> {
7   def NAME #_EQ : Joined<["--"], name #"=">,
8                   HelpText<help>;
9   def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
10 }
11
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">;
18
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>">;