mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
af9e355755
This adds KIND_REMAINING_ARGS, a class of options that consume all remaining arguments on the command line. This will be used to support /link in clang-cl, which is used to forward all remaining arguments to the linker. It also allows us to remove the hard-coded handling of "--", allowing clients (clang and lld) to implement that functionality themselves with this new option class. Differential Revision: http://llvm-reviews.chandlerc.com/D1387 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188314 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
1.1 KiB
TableGen
27 lines
1.1 KiB
TableGen
include "llvm/Option/OptParser.td"
|
|
|
|
def OptFlag1 : OptionFlag;
|
|
def OptFlag2 : OptionFlag;
|
|
def OptFlag3 : OptionFlag;
|
|
|
|
def A : Flag<["-"], "A">, HelpText<"The A option">, Flags<[OptFlag1]>;
|
|
def B : Joined<["-"], "B">, HelpText<"The B option">, MetaVarName<"B">, Flags<[OptFlag2]>;
|
|
def C : Separate<["-"], "C">, HelpText<"The C option">, MetaVarName<"C">, Flags<[OptFlag1]>;
|
|
def SLASH_C : Separate<["/", "-"], "C">, HelpText<"The C option">, MetaVarName<"C">, Flags<[OptFlag3]>;
|
|
def D : CommaJoined<["-"], "D">, HelpText<"The D option">, MetaVarName<"D">;
|
|
def E : MultiArg<["-"], "E", 2>, Flags<[OptFlag1, OptFlag2]>;
|
|
def F : JoinedOrSeparate<["-"], "F">, HelpText<"The F option">, MetaVarName<"F">;
|
|
def G : JoinedAndSeparate<["-"], "G">, HelpText<"The G option">, MetaVarName<"G">;
|
|
|
|
def Ceq : Joined<["-", "--"], "C=">, Alias<C>, Flags<[OptFlag1]>;
|
|
|
|
def H : Flag<["-"], "H">, Flags<[HelpHidden]>;
|
|
|
|
def my_group : OptionGroup<"my group">;
|
|
def I : Flag<["-"], "I">, Alias<H>, Group<my_group>;
|
|
|
|
def J : Flag<["-"], "J">, Alias<B>, AliasArgs<["foo"]>;
|
|
def Joo : Flag<["-"], "Joo">, Alias<B>, AliasArgs<["bar"]>;
|
|
|
|
def Slurp : Option<["-"], "slurp", KIND_REMAINING_ARGS>;
|