diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-03-20 15:59:01 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-20 15:59:01 +0000 |
| commit | e81cc832f6640fe04f0fb9aac3d432571b1644f0 (patch) | |
| tree | 99738f21491d4fc39f03224561de9b8d4ee7d83d /clang/lib | |
| parent | a1321f1632112291523850f1144612b87b5a03a1 (diff) | |
| download | bcm5719-llvm-e81cc832f6640fe04f0fb9aac3d432571b1644f0.tar.gz bcm5719-llvm-e81cc832f6640fe04f0fb9aac3d432571b1644f0.zip | |
Driver: Add two option overload for AddAllArgValues.
llvm-svn: 67377
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/ArgList.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Driver/ArgList.cpp b/clang/lib/Driver/ArgList.cpp index ee201f28bd1..30da136e048 100644 --- a/clang/lib/Driver/ArgList.cpp +++ b/clang/lib/Driver/ArgList.cpp @@ -162,3 +162,16 @@ void ArgList::AddAllArgValues(ArgStringList &Output, options::ID Id0) const { } } } + +void ArgList::AddAllArgValues(ArgStringList &Output, options::ID Id0, + options::ID Id1) const { + // FIXME: Make fast. + for (const_iterator it = begin(), ie = end(); it != ie; ++it) { + const Arg *A = *it; + if (A->getOption().matches(Id0) || A->getOption().matches(Id1)) { + A->claim(); + for (unsigned i = 0, e = A->getNumValues(); i != e; ++i) + Output.push_back(A->getValue(*this, i)); + } + } +} |

