aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ArgList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r--lib/Driver/ArgList.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp
index bd3aab351d..44549b0636 100644
--- a/lib/Driver/ArgList.cpp
+++ b/lib/Driver/ArgList.cpp
@@ -127,6 +127,19 @@ void ArgList::AddAllArgValues(ArgStringList &Output, options::ID Id0,
}
}
+void ArgList::AddAllArgsTranslated(ArgStringList &Output, options::ID Id0,
+ const char *Translation) const {
+ // FIXME: Make fast.
+ for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
+ const Arg *A = *it;
+ if (A->getOption().matches(Id0)) {
+ A->claim();
+ Output.push_back(Translation);
+ Output.push_back(A->getValue(*this, 0));
+ }
+ }
+}
+
//
InputArgList::InputArgList(const char **ArgBegin, const char **ArgEnd)