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">;
18defm strip_underscore : BB<"strip-underscore", "Strip the leading underscore", "Don't strip the leading underscore">;
19def types : FF<"types", "Attempt to demangle types as well as function names">;
20def version : FF<"version", "Display the version">;
21
22defm : Eq<"format", "Specify mangling format. Currently ignored because only 'gnu' is supported">;
23def : F<"s", "Alias for --format">;
24
25def : F<"_", "Alias for --strip-underscore">, Alias<strip_underscore>;
26def : F<"h", "Alias for --help">, Alias<help>;
27def : F<"n", "Alias for --no-strip-underscore">, Alias<no_strip_underscore>;
28def : F<"t", "Alias for --types">, Alias<types>;
29