Options: Add new option kind that consumes remaining arguments
authorHans Wennborg <hans@hanshq.net>
Tue, 13 Aug 2013 21:09:50 +0000 (21:09 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 13 Aug 2013 21:09:50 +0000 (21:09 +0000)
commitaf9e3557552c341615052a05d4eeb36d7fd5c33f
tree4849f2d2fea5491ad0421600d01edbd9cd2e05c5
parent3f70e908c3d9de7acea462719ebf36dca1560f9c
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
include/llvm/Option/OptParser.td
include/llvm/Option/Option.h
lib/Option/OptTable.cpp
lib/Option/Option.cpp
unittests/Option/OptionParsingTest.cpp
unittests/Option/Opts.td