1 include "llvm/Option/OptParser.td" 2 3 def OptFlag1 : OptionFlag; 4 def OptFlag2 : OptionFlag; 5 def OptFlag3 : OptionFlag; 6 7 def A : Flag<["-"], "A">, HelpText<"The A option">, Flags<[OptFlag1]>; 8 def B : Joined<["-"], "B">, HelpText<"The B option">, MetaVarName<"B">, Flags<[OptFlag2]>; 9 def C : Separate<["-"], "C">, HelpText<"The C option">, MetaVarName<"C">, Flags<[OptFlag1]>; 10 def SLASH_C : Separate<["/", "-"], "C">, HelpText<"The C option">, MetaVarName<"C">, Flags<[OptFlag3]>; 11 def D : CommaJoined<["-"], "D">, HelpText<"The D option">, MetaVarName<"D">; 12 def E : MultiArg<["-"], "E", 2>, Flags<[OptFlag1, OptFlag2]>; 13 def F : JoinedOrSeparate<["-"], "F">, HelpText<"The F option">, MetaVarName<"F">; 14 def G : JoinedAndSeparate<["-"], "G">, HelpText<"The G option">, MetaVarName<"G">; 15 16 def Ceq : Joined<["-", "--"], "C=">, Alias<C>, Flags<[OptFlag1]>; 17 18 def H : Flag<["-"], "H">, Flags<[HelpHidden]>; 19 20 def my_group : OptionGroup<"my group">; 21 def I : Flag<["-"], "I">, Alias<H>, Group<my_group>; 22 23 def J : Flag<["-"], "J">, Alias<B>, AliasArgs<["foo"]>; 24 def Joo : Flag<["-"], "Joo">, Alias<B>, AliasArgs<["bar"]>; 25