[PATCH] D82231: [NFC] Remove unused pass name parser classes

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 14:09:53 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2565581e3704: [NFC] Remove unused pass name parser classes (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82231/new/

https://reviews.llvm.org/D82231

Files:
  llvm/include/llvm/IR/LegacyPassNameParser.h


Index: llvm/include/llvm/IR/LegacyPassNameParser.h
===================================================================
--- llvm/include/llvm/IR/LegacyPassNameParser.h
+++ llvm/include/llvm/IR/LegacyPassNameParser.h
@@ -92,47 +92,6 @@
   }
 };
 
-///===----------------------------------------------------------------------===//
-/// 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<typename Filter>
-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<PassArgFilter<AllowedPassArgs> > >
-/// PassList(cl::desc("Passes available:"));
-///
-/// Only the -anders_aa and -dse options will be available to the user.
-///
-template<const char *Args>
-class PassArgFilter {
-public:
-  bool operator()(const PassInfo &P) const {
-    return StringRef(Args).contains(P.getPassArgument());
-  }
-};
-
 } // End llvm namespace
 
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82231.272179.patch
Type: text/x-patch
Size: 1601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200619/08f1de3f/attachment-0001.bin>


More information about the cfe-commits mailing list