[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
This commit is contained in:
Arthur Eubanks
2020-06-19 13:41:42 -07:00
parent aa7cd42993
commit 2565581e37
@@ -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<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