forked from OSchip/llvm-project
Driver: Add two option overload for AddAllArgValues.
llvm-svn: 67377
This commit is contained in:
parent
a1321f1632
commit
e81cc832f6
|
@ -129,13 +129,16 @@ namespace driver {
|
|||
|
||||
/// AddAllArgs - Render all arguments matching the given ids.
|
||||
void AddAllArgs(ArgStringList &Output, options::ID Id0) const;
|
||||
void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1) const;
|
||||
void AddAllArgs(ArgStringList &Output, options::ID Id0,
|
||||
options::ID Id1) const;
|
||||
void AddAllArgs(ArgStringList &Output, options::ID Id0, options::ID Id1,
|
||||
options::ID Id2) const;
|
||||
|
||||
/// AddAllArgValues - Render the argument values of all arguments
|
||||
/// matching the given ids.
|
||||
void AddAllArgValues(ArgStringList &Output, options::ID Id0) const;
|
||||
void AddAllArgValues(ArgStringList &Output, options::ID Id0,
|
||||
options::ID Id1) const;
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue