mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Merge changes to clang's Driver code into LLVM's Option library
This is in preparation for switching the clang driver over to using LLVM's Option library. Richard Smith introduced most of these changes to the clang driver in r167638. Reviewers: espindola on IRC Differential Revision: http://llvm-reviews.chandlerc.com/D970 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183925 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -206,6 +206,13 @@ bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default) const {
|
||||
return Default;
|
||||
}
|
||||
|
||||
bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,
|
||||
bool Default) const {
|
||||
if (Arg *A = getLastArg(Pos, PosAlias, Neg))
|
||||
return A->getOption().matches(Pos) || A->getOption().matches(PosAlias);
|
||||
return Default;
|
||||
}
|
||||
|
||||
StringRef ArgList::getLastArgValue(OptSpecifier Id,
|
||||
StringRef Default) const {
|
||||
if (Arg *A = getLastArg(Id))
|
||||
@@ -226,6 +233,14 @@ void ArgList::AddLastArg(ArgStringList &Output, OptSpecifier Id) const {
|
||||
}
|
||||
}
|
||||
|
||||
void ArgList::AddLastArg(ArgStringList &Output, OptSpecifier Id0,
|
||||
OptSpecifier Id1) const {
|
||||
if (Arg *A = getLastArg(Id0, Id1)) {
|
||||
A->claim();
|
||||
A->render(*this, Output);
|
||||
}
|
||||
}
|
||||
|
||||
void ArgList::AddAllArgs(ArgStringList &Output, OptSpecifier Id0,
|
||||
OptSpecifier Id1, OptSpecifier Id2) const {
|
||||
for (arg_iterator it = filtered_begin(Id0, Id1, Id2),
|
||||
|
||||
Reference in New Issue
Block a user