mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Options: Add new option kind that consumes remaining arguments
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
This commit is contained in:
@@ -44,6 +44,8 @@ def KIND_JOINED_OR_SEPARATE : OptionKind<"JoinedOrSeparate">;
|
||||
// An option which is both joined to its (first) value, and followed by its
|
||||
// (second) value.
|
||||
def KIND_JOINED_AND_SEPARATE : OptionKind<"JoinedAndSeparate">;
|
||||
// An option which consumes all remaining arguments if there are any.
|
||||
def KIND_REMAINING_ARGS : OptionKind<"RemainingArgs">;
|
||||
|
||||
// Define the option flags.
|
||||
|
||||
|
@@ -50,6 +50,7 @@ public:
|
||||
FlagClass,
|
||||
JoinedClass,
|
||||
SeparateClass,
|
||||
RemainingArgsClass,
|
||||
CommaJoinedClass,
|
||||
MultiArgClass,
|
||||
JoinedOrSeparateClass,
|
||||
@@ -149,6 +150,7 @@ public:
|
||||
case SeparateClass:
|
||||
case MultiArgClass:
|
||||
case JoinedOrSeparateClass:
|
||||
case RemainingArgsClass:
|
||||
return RenderSeparateStyle;
|
||||
}
|
||||
llvm_unreachable("Unexpected kind!");
|
||||
|
Reference in New Issue
Block a user