1fe6060f1SDimitry Andricinclude "llvm/Option/OptParser.td" 2fe6060f1SDimitry Andric 3fe6060f1SDimitry Andricclass F<string letter, string help> : Flag<["-"], letter>, HelpText<help>; 4fe6060f1SDimitry Andricclass FF<string name, string help> : Flag<["--"], name>, HelpText<help>; 5fe6060f1SDimitry Andric 6fe6060f1SDimitry Andricmulticlass BB<string name, string help1, string help2> { 7fe6060f1SDimitry Andric def NAME: Flag<["--"], name>, HelpText<help1>; 8fe6060f1SDimitry Andric def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>; 9fe6060f1SDimitry Andric} 10fe6060f1SDimitry Andric 11fe6060f1SDimitry Andricmulticlass Eq<string name, string help> { 12fe6060f1SDimitry Andric def NAME #_EQ : Joined<["--"], name #"=">, 13fe6060f1SDimitry Andric HelpText<help>; 14fe6060f1SDimitry Andric def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>; 15fe6060f1SDimitry Andric} 16fe6060f1SDimitry Andric 17fe6060f1SDimitry Andricdef help : FF<"help", "Display this help">; 18fe6060f1SDimitry Andricdefm strip_underscore : BB<"strip-underscore", "Strip the leading underscore", "Don't strip the leading underscore">; 1981ad6265SDimitry Andricdef types : FF<"types", "Attempt to demangle types as well as function names">; 20*1db9f3b2SDimitry Andricdef no_params : FF<"no-params", "Skip function parameters and return types">; 21fe6060f1SDimitry Andricdef version : FF<"version", "Display the version">; 22fe6060f1SDimitry Andric 23fe6060f1SDimitry Andricdefm : Eq<"format", "Specify mangling format. Currently ignored because only 'gnu' is supported">; 24fe6060f1SDimitry Andricdef : F<"s", "Alias for --format">; 25fe6060f1SDimitry Andric 26fe6060f1SDimitry Andricdef : F<"_", "Alias for --strip-underscore">, Alias<strip_underscore>; 27fe6060f1SDimitry Andricdef : F<"h", "Alias for --help">, Alias<help>; 28fe6060f1SDimitry Andricdef : F<"n", "Alias for --no-strip-underscore">, Alias<no_strip_underscore>; 29*1db9f3b2SDimitry Andricdef : F<"p", "Alias for --no-params">, Alias<no_params>; 30fe6060f1SDimitry Andricdef : F<"t", "Alias for --types">, Alias<types>; 31