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 | ee51031c3734176d00723054c765538fcffc0984 (patch) | |
tree | 78acc9cbf3d890d970d1f05d6cfc87e26740623c /lib/Driver/ArgList.cpp | |
parent | 318ca7106d59c9851125b9b8979e2dff05b390d0 (diff) |
Driver: Add two option overload for AddAllArgValues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r-- | lib/Driver/ArgList.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp index ee201f28bd..30da136e04 100644 --- a/lib/Driver/ArgList.cpp +++ b/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)); + } + } +} |