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 BB<string name, string help1, string help2> {
7 def NAME: Flag<["--"], name>, HelpText<help1>;
8 def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
11 multiclass Eq<string name, string help> {
12 def NAME #_EQ : Joined<["--"], name #"=">,
14 def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
17 def help : FF<"help", "Display this help">;
18 defm strip_underscore : BB<"strip-underscore", "Strip the leading underscore", "Don't strip the leading underscore">;
19 def types : FF<"types", "Attempt to demangle types as well as function names">;
20 def version : FF<"version", "Display the version">;
22 defm : Eq<"format", "Specify mangling format. Currently ignored because only 'gnu' is supported">;
23 def : F<"s", "Alias for --format">;
25 def : F<"_", "Alias for --strip-underscore">, Alias<strip_underscore>;
26 def : F<"h", "Alias for --help">, Alias<help>;
27 def : F<"n", "Alias for --no-strip-underscore">, Alias<no_strip_underscore>;
28 def : F<"t", "Alias for --types">, Alias<types>;