Add 'using' declarations to suppress -Woverloaded-virtual warnings.
authorMatt Beaumont-Gay <matthewbg@google.com>
Tue, 4 Dec 2012 05:41:27 +0000 (05:41 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Tue, 4 Dec 2012 05:41:27 +0000 (05:41 +0000)
llvm-svn: 169214

llvm/include/llvm/Transforms/IPO/InlinerPass.h
llvm/lib/Transforms/IPO/InlineAlways.cpp
llvm/lib/Transforms/IPO/InlineSimple.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/unittests/VMCore/PassManagerTest.cpp

index b036040..99232de 100644 (file)
@@ -42,6 +42,7 @@ struct Inliner : public CallGraphSCCPass {
   // Pass class.
   virtual bool runOnSCC(CallGraphSCC &SCC);
 
+  using llvm::Pass::doFinalization;
   // doFinalization - Remove now-dead linkonce functions at the end of
   // processing to avoid breaking the SCC traversal.
   virtual bool doFinalization(CallGraph &CG);
index ffefad0..5b8832e 100644 (file)
@@ -44,6 +44,10 @@ namespace {
     }
     static char ID; // Pass identification, replacement for typeid
     virtual InlineCost getInlineCost(CallSite CS);
+
+    using llvm::Pass::doInitialization;
+    using llvm::Pass::doFinalization;
+
     virtual bool doFinalization(CallGraph &CG) {
       return removeDeadFunctions(CG, /*AlwaysInlineOnly=*/true);
     }
index 5e817ac..9c5feba 100644 (file)
@@ -42,6 +42,7 @@ namespace {
     InlineCost getInlineCost(CallSite CS) {
       return CA.getInlineCost(CS, getInlineThreshold(CS));
     }
+    using llvm::Pass::doInitialization;
     virtual bool doInitialization(CallGraph &CG);
   };
 }
index 56bd459..7ef1d34 100644 (file)
@@ -90,6 +90,8 @@ namespace {
       AU.addRequired<TargetLibraryInfo>();
     }
 
+    using llvm::Pass::doFinalization;
+
     bool doFinalization() {
       assert(LoopToAliasSetMap.empty() && "Didn't free loop alias sets");
       return false;
index 9c070c8..3219042 100644 (file)
@@ -148,6 +148,8 @@ namespace llvm {
     template<typename T, typename P>
     struct PassTest : public PassTestBase<P> {
     public:
+      using llvm::Pass::doInitialization;
+      using llvm::Pass::doFinalization;
       virtual bool doInitialization(T &t) {
         EXPECT_FALSE(PassTestBase<P>::initialized);
         PassTestBase<P>::initialized = true;
@@ -198,6 +200,8 @@ namespace llvm {
         EXPECT_EQ(run, initcount);
         EXPECT_EQ(finalized, fincount);
       }
+      using llvm::Pass::doInitialization;
+      using llvm::Pass::doFinalization;
       virtual bool doInitialization(Loop* L, LPPassManager &LPM) {
         initialized = true;
         initcount++;