Implementing of decrement operators allows doing things like:
for (auto *Arg : llvm::reverse(Args.filtered(OPT_z)))
Paths
| Differential D30570
Option parsing: implement decrement operators for arg_iterator AbandonedPublic Authored by grimar on Mar 3 2017, 5:27 AM.
Details
Diff Detail Event TimelineComment Actions Any chance of using the llvm utility iterator_facade to simplify this class & provide the new functionality? This revision now requires changes to proceed.Mar 5 2017, 3:38 PM Comment Actions
Case is https://reviews.llvm.org/D30530#inline-264974. -z linker option can have any text parameter: -z foo, -z boo, -z moo. In my case I am trying to support Comment Actions I'm not entirely sure it's worth the complexity. This just allows the lld driver to return early. Comment Actions In other words, if you find other cases where this help, fair enough, but I'm reluctant to introduce new code in ArgList with a single consumer for cosmetic reasons only. Comment Actions
I see.
Revision Contents
Diff 90464 include/llvm/Option/ArgList.h
lib/Option/ArgList.cpp
unittests/Option/OptionParsingTest.cpp
|