Mercurial > hg > CbC > CbC_llvm
diff llvm/lib/Option/ArgList.cpp @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 1d019706d866 |
children | 1f2b6ac9f198 |
line wrap: on
line diff
--- a/llvm/lib/Option/ArgList.cpp Wed Jul 21 10:27:27 2021 +0900 +++ b/llvm/lib/Option/ArgList.cpp Wed Nov 09 17:45:10 2022 +0900 @@ -95,6 +95,13 @@ return std::vector<std::string>(Values.begin(), Values.end()); } +void ArgList::addOptInFlag(ArgStringList &Output, OptSpecifier Pos, + OptSpecifier Neg) const { + if (Arg *A = getLastArg(Pos, Neg)) + if (A->getOption().matches(Pos)) + A->render(*this, Output); +} + void ArgList::AddAllArgsExcept(ArgStringList &Output, ArrayRef<OptSpecifier> Ids, ArrayRef<OptSpecifier> ExcludeIds) const { @@ -129,7 +136,7 @@ /// that accepts a single specifier, given the above which accepts any number. void ArgList::AddAllArgs(ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const { - for (auto Arg: filtered(Id0, Id1, Id2)) { + for (auto *Arg : filtered(Id0, Id1, Id2)) { Arg->claim(); Arg->render(*this, Output); } @@ -137,7 +144,7 @@ void ArgList::AddAllArgValues(ArgStringList &Output, OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const { - for (auto Arg : filtered(Id0, Id1, Id2)) { + for (auto *Arg : filtered(Id0, Id1, Id2)) { Arg->claim(); const auto &Values = Arg->getValues(); Output.append(Values.begin(), Values.end()); @@ -147,7 +154,7 @@ void ArgList::AddAllArgsTranslated(ArgStringList &Output, OptSpecifier Id0, const char *Translation, bool Joined) const { - for (auto Arg: filtered(Id0)) { + for (auto *Arg : filtered(Id0)) { Arg->claim(); if (Joined) {