From 8ba15cb7099d9eadcb345328228d77ffa5afa42d Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 20 Jul 2010 01:19:58 +0000 Subject: Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/PassNameParser.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include/llvm/Support/PassNameParser.h') diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/Support/PassNameParser.h index cdca978cfe..c3564399e2 100644 --- a/include/llvm/Support/PassNameParser.h +++ b/include/llvm/Support/PassNameParser.h @@ -55,9 +55,11 @@ public: // ignorablePassImpl - Can be overriden in subclasses to refine the list of // which passes we want to include. // - virtual bool ignorablePassImpl(const PassInfo *P) const { return false; } + virtual bool ignorablePassImpl(const StaticPassInfo *P) const { + return false; + } - inline bool ignorablePass(const PassInfo *P) const { + inline bool ignorablePass(const StaticPassInfo *P) const { // Ignore non-selectable and non-constructible passes! Ignore // non-optimizations. return P->getPassArgument() == 0 || *P->getPassArgument() == 0 || @@ -66,7 +68,7 @@ public: // Implement the PassRegistrationListener callbacks used to populate our map // - virtual void passRegistered(const PassInfo *P) { + virtual void passRegistered(const StaticPassInfo *P) { if (ignorablePass(P) || !Opt) return; if (findOption(P->getPassArgument()) != getNumOptions()) { errs() << "Two passes with the same argument (-" @@ -75,7 +77,7 @@ public: } addLiteralOption(P->getPassArgument(), P, P->getPassName()); } - virtual void passEnumerate(const PassInfo *P) { passRegistered(P); } + virtual void passEnumerate(const StaticPassInfo *P) { passRegistered(P); } // ValLessThan - Provide a sorting comparator for Values elements... typedef std::pair