xref: /llvm-project/llvm/tools/llvm-cxxfilt/Opts.td (revision d4dd770289b506a2a0fed6fe4add68048f37748d)
1include "llvm/Option/OptParser.td"
2
3class F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
4class FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
5
6multiclass BB<string name, string help1, string help2> {
7  def NAME: Flag<["--"], name>, HelpText<help1>;
8  def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
9}
10
11multiclass Eq<string name, string help> {
12  def NAME #_EQ : Joined<["--"], name #"=">,
13                  HelpText<help>;
14  def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
15}
16
17def help : FF<"help", "Display this help">;
18def quote : FF<"quote", "Quote demangled names with \" \" if not already quoted">;
19defm strip_underscore : BB<"strip-underscore", "Strip the leading underscore", "Don't strip the leading underscore">;
20def types : FF<"types", "Attempt to demangle types as well as symbol names">;
21def no_params : FF<"no-params", "Skip function parameters and return types">;
22def version : FF<"version", "Display the version">;
23
24defm : Eq<"format", "Specify mangling format. Currently ignored because only 'gnu' is supported">;
25def : F<"s", "Alias for --format">;
26
27def : F<"_", "Alias for --strip-underscore">, Alias<strip_underscore>;
28def : F<"h", "Alias for --help">, Alias<help>;
29def : F<"n", "Alias for --no-strip-underscore">, Alias<no_strip_underscore>;
30def : F<"p", "Alias for --no-params">, Alias<no_params>;
31def : F<"t", "Alias for --types">, Alias<types>;
32