diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-08-13 21:09:50 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-08-13 21:09:50 +0000 |
commit | af9e3557552c341615052a05d4eeb36d7fd5c33f (patch) | |
tree | 4849f2d2fea5491ad0421600d01edbd9cd2e05c5 /include | |
parent | 3f70e908c3d9de7acea462719ebf36dca1560f9c (diff) | |
download | external_llvm-af9e3557552c341615052a05d4eeb36d7fd5c33f.zip external_llvm-af9e3557552c341615052a05d4eeb36d7fd5c33f.tar.gz external_llvm-af9e3557552c341615052a05d4eeb36d7fd5c33f.tar.bz2 |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Option/OptParser.td | 2 | ||||
-rw-r--r-- | include/llvm/Option/Option.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Option/OptParser.td b/include/llvm/Option/OptParser.td index 32cc2c0..963389f 100644 --- a/include/llvm/Option/OptParser.td +++ b/include/llvm/Option/OptParser.td @@ -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. diff --git a/include/llvm/Option/Option.h b/include/llvm/Option/Option.h index 47fd817..03d4774 100644 --- a/include/llvm/Option/Option.h +++ b/include/llvm/Option/Option.h @@ -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!"); |