diff --git a/include/llvm/Option/ArgList.h b/include/llvm/Option/ArgList.h index 4ac034635c3..f6abf2a62aa 100644 --- a/include/llvm/Option/ArgList.h +++ b/include/llvm/Option/ArgList.h @@ -137,16 +137,6 @@ private: /// The first and last index of each different OptSpecifier ID. DenseMap OptRanges; - /// The OptSpecifiers that were queried from this argument list. - mutable DenseSet QueriedOpts; - - /// Record the queried OptSpecifiers. - template - void recordQueriedOpts(OptSpecifiers... Ids) const { - SmallVector OptsSpecifiers({toOptSpecifier(Ids).getID()...}); - QueriedOpts.insert(OptsSpecifiers.begin(), OptsSpecifiers.end()); - } - /// Get the range of indexes in which options with the specified IDs might /// reside, or (0, 0) if there are no such options. OptRange getRange(std::initializer_list Ids) const; @@ -213,7 +203,6 @@ public: template iterator_range> filtered(OptSpecifiers ...Ids) const { - recordQueriedOpts(Ids...); OptRange Range = getRange({toOptSpecifier(Ids)...}); auto B = Args.begin() + Range.first; auto E = Args.begin() + Range.second; @@ -225,7 +214,6 @@ public: template iterator_range> filtered_reverse(OptSpecifiers ...Ids) const { - recordQueriedOpts(Ids...); OptRange Range = getRange({toOptSpecifier(Ids)...}); auto B = Args.rend() - Range.second; auto E = Args.rend() - Range.first; @@ -320,10 +308,6 @@ public: A->render(*this, Output); } - /// AddAllArgsExcept - Render all arguments not matching any of the excluded - /// ids. - void AddAllArgsExcept(ArgStringList &Output, - const DenseSet &ExcludeIds) const; /// AddAllArgsExcept - Render all arguments matching any of the given ids /// and not matching any of the excluded ids. void AddAllArgsExcept(ArgStringList &Output, ArrayRef Ids, @@ -357,13 +341,6 @@ public: /// ClaimAllArgs - Claim all arguments. /// void ClaimAllArgs() const; - - /// Return the OptSpecifiers queried from this argument list. - const DenseSet &getQueriedOpts() const { return QueriedOpts; } - - /// Clear the set of queried OptSpecifiers. - void clearQueriedOpts() const { QueriedOpts.clear(); } - /// @} /// @name Arg Synthesis /// @{ diff --git a/lib/Option/ArgList.cpp b/lib/Option/ArgList.cpp index 2a59bc8460e..ad7be5fbec1 100644 --- a/lib/Option/ArgList.cpp +++ b/lib/Option/ArgList.cpp @@ -90,22 +90,11 @@ StringRef ArgList::getLastArgValue(OptSpecifier Id, StringRef Default) const { } std::vector ArgList::getAllArgValues(OptSpecifier Id) const { - recordQueriedOpts(Id); SmallVector Values; AddAllArgValues(Values, Id); return std::vector(Values.begin(), Values.end()); } -void ArgList::AddAllArgsExcept(ArgStringList &Output, - const DenseSet &ExcludeIds) const { - for (const Arg *Arg : *this) { - if (!ExcludeIds.contains(Arg->getOption().getID())) { - Arg->claim(); - Arg->render(*this, Output); - } - } -} - void ArgList::AddAllArgsExcept(ArgStringList &Output, ArrayRef Ids, ArrayRef ExcludeIds) const {