aeubanks updated this revision to Diff 272166. aeubanks added a comment. Unintended change
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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits