• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include "llvm/Option/OptParser.td"
2
3def OptFlag1 : OptionFlag;
4def OptFlag2 : OptionFlag;
5def OptFlag3 : OptionFlag;
6
7def A : Flag<["-"], "A">, HelpText<"The A option">, Flags<[OptFlag1]>;
8def B : Joined<["-"], "B">, HelpText<"The B option">, MetaVarName<"B">, Flags<[OptFlag2]>;
9def C : Separate<["-"], "C">, HelpText<"The C option">, MetaVarName<"C">, Flags<[OptFlag1]>;
10def SLASH_C : Separate<["/", "-"], "C">, HelpText<"The C option">, MetaVarName<"C">, Flags<[OptFlag3]>;
11def D : CommaJoined<["-"], "D">, HelpText<"The D option">, MetaVarName<"D">;
12def E : MultiArg<["-"], "E", 2>, Flags<[OptFlag1, OptFlag2]>;
13def F : JoinedOrSeparate<["-"], "F">, HelpText<"The F option">, MetaVarName<"F">;
14def G : JoinedAndSeparate<["-"], "G">, HelpText<"The G option">, MetaVarName<"G">;
15
16def Ceq : Joined<["-", "--"], "C=">, Alias<C>, Flags<[OptFlag1]>;
17
18def H : Flag<["-"], "H">, Flags<[HelpHidden]>;
19
20def my_group : OptionGroup<"my group">;
21def I : Flag<["-"], "I">, Alias<H>, Group<my_group>;
22
23def J : Flag<["-"], "J">, Alias<B>, AliasArgs<["foo"]>;
24def Joo : Flag<["-"], "Joo">, Alias<B>, AliasArgs<["bar"]>;
25
26def K : Flag<["-"], "K">, Alias<B>;
27
28def Slurp : Option<["-"], "slurp", KIND_REMAINING_ARGS>;
29
30def SlurpJoined : Option<["-"], "slurpjoined", KIND_REMAINING_ARGS_JOINED>;
31