This is an archive of the discontinued LLVM Phabricator instance.

Options: Add new option kind that consumes remaining arguments
ClosedPublic

Authored by hans on Aug 13 2013, 1:43 PM.

Details

Summary

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.

Please take a look!

Diff Detail

Event Timeline

rnk accepted this revision.Aug 13 2013, 1:57 PM

LGTM

lib/Option/OptTable.cpp
264 ↗(On Diff #3446)

I actually kind of liked having this logic here so we shared it with clang and lld, but I guess it's cleaner to let the tool decide what to do with the arguments after --.

hans closed this revision.Aug 13 2013, 2:12 PM

Closed by commit rL188314 (authored by @hans).