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 no_params : FF<"no-params", "Skip function parameters and return types">; 21def version : FF<"version", "Display the version">; 22 23defm : Eq<"format", "Specify mangling format. Currently ignored because only 'gnu' is supported">; 24def : F<"s", "Alias for --format">; 25 26def : F<"_", "Alias for --strip-underscore">, Alias<strip_underscore>; 27def : F<"h", "Alias for --help">, Alias<help>; 28def : F<"n", "Alias for --no-strip-underscore">, Alias<no_strip_underscore>; 29def : F<"p", "Alias for --no-params">, Alias<no_params>; 30def : F<"t", "Alias for --types">, Alias<types>; 31