From 2565581e3704a9418e024e4fb8575ec8b14dce5d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 19 Jun 2020 12:42:00 -0700 Subject: [PATCH] [NFC] Remove unused pass name parser classes Summary: Looks like these were for the most part touched over a decade ago. Subscribers: mgorny, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D82231 --- llvm/include/llvm/IR/LegacyPassNameParser.h | 41 --------------------- 1 file changed, 41 deletions(-) diff --git a/llvm/include/llvm/IR/LegacyPassNameParser.h b/llvm/include/llvm/IR/LegacyPassNameParser.h index 30820e750350..c33b9fc40472 100644 --- a/llvm/include/llvm/IR/LegacyPassNameParser.h +++ b/llvm/include/llvm/IR/LegacyPassNameParser.h @@ -92,47 +92,6 @@ private: } }; -///===----------------------------------------------------------------------===// -/// FilteredPassNameParser class - Make use of the pass registration -/// mechanism to automatically add a command line argument to opt for -/// each pass that satisfies a filter criteria. Filter should return -/// true for passes to be registered as command-line options. -/// -template -class FilteredPassNameParser : public PassNameParser { -private: - Filter filter; - -public: - bool ignorablePassImpl(const PassInfo *P) const override { - return !filter(*P); - } -}; - -///===----------------------------------------------------------------------===// -/// PassArgFilter - A filter for use with PassNameFilterParser that only -/// accepts a Pass whose Arg matches certain strings. -/// -/// Use like this: -/// -/// extern const char AllowedPassArgs[] = "-anders_aa -dse"; -/// -/// static cl::list< -/// const PassInfo*, -/// bool, -/// FilteredPassNameParser > > -/// PassList(cl::desc("Passes available:")); -/// -/// Only the -anders_aa and -dse options will be available to the user. -/// -template -class PassArgFilter { -public: - bool operator()(const PassInfo &P) const { - return StringRef(Args).contains(P.getPassArgument()); - } -}; - } // End llvm namespace #endif