diff --git a/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h index 79d99a71c2009..fcde68e0b7fe8 100644 --- a/llvm/include/llvm/Option/ArgList.h +++ b/llvm/include/llvm/Option/ArgList.h @@ -333,8 +333,7 @@ class ArgList { void addAllArgs(ArgStringList &Output, ArrayRef Ids) const; /// AddAllArgs - Render all arguments matching the given ids. - void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, - OptSpecifier Id1 = 0U, OptSpecifier Id2 = 0U) const; + void AddAllArgs(ArgStringList &Output, OptSpecifier Id0) const; /// AddAllArgValues - Render the argument values of all arguments /// matching the given ids. diff --git a/llvm/lib/Option/ArgList.cpp b/llvm/lib/Option/ArgList.cpp index 5b267180d2b37..8f764ec779f3f 100644 --- a/llvm/lib/Option/ArgList.cpp +++ b/llvm/lib/Option/ArgList.cpp @@ -138,11 +138,8 @@ void ArgList::addAllArgs(ArgStringList &Output, AddAllArgsExcept(Output, Ids, Exclude); } -/// This 3-opt variant of AddAllArgs could be eliminated in favor of one -/// 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)) { +void ArgList::AddAllArgs(ArgStringList &Output, OptSpecifier Id0) const { + for (auto *Arg : filtered(Id0)) { Arg->claim(); Arg->render(*this, Output); }