For PR387:\
authorReid Spencer <rspencer@reidspencer.com>
Tue, 7 Dec 2004 04:03:45 +0000 (04:03 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 7 Dec 2004 04:03:45 +0000 (04:03 +0000)
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8

25 files changed:
include/llvm/Analysis/Dominators.h
include/llvm/Analysis/IntervalPartition.h
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/Pass.h
lib/Analysis/AliasSetTracker.cpp
lib/Analysis/CFGPrinter.cpp
lib/Analysis/DataStructure/DataStructureStats.cpp
lib/Analysis/DataStructure/IPModRef.cpp
lib/Analysis/DataStructure/IPModRef.h
lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
lib/Analysis/DataStructure/MemoryDepAnalysis.h
lib/Analysis/DataStructure/PgmDependenceGraph.cpp
lib/Analysis/DataStructure/PgmDependenceGraph.h
lib/Analysis/IPA/PrintSCC.cpp
lib/Analysis/IntervalPartition.cpp
lib/Analysis/LoopInfo.cpp
lib/Analysis/ScalarEvolution.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/LiveIntervalAnalysis.h
lib/VMCore/Dominators.cpp
lib/VMCore/Pass.cpp
tools/analyze/PrintSCC.cpp
tools/opt/PrintSCC.cpp

index c1cdae50f2352e3c46fe56f90ea4438b4604d18a..c9019114954ecc80c647d2a8ebfea0eb4eb0c432 100644 (file)
@@ -114,7 +114,7 @@ public:
 
   /// print - Convert to human readable form
   ///
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS, const Module* = 0) const;
 };
 
 //===-------------------------------------
@@ -218,7 +218,7 @@ public:
 
   /// print - Convert to human readable form
   ///
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS, const Module* = 0) const;
 
   /// dominates - Return true if A dominates B.  This performs the special
   /// checks necessary if A and B are in the same basic block.
@@ -375,7 +375,7 @@ public:
 
   /// print - Convert to human readable form
   ///
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS, const Module* = 0) const;
 };
 
 
@@ -475,7 +475,7 @@ public:
 
   /// print - Convert to human readable form
   ///
-  virtual void print(std::ostream &OS) const;
+  virtual void print(std::ostream &OS, const Module* = 0) const;
 };
 
 
index 408ace2e7ef47f771ba2e356ec5f7fa407276432..d5dd64eca71747efb02ef4b6aece8c07aeae42f6 100644 (file)
@@ -60,7 +60,7 @@ public:
   ~IntervalPartition() { destroy(); }
 
   // print - Show contents in human readable format...
-  virtual void print(std::ostream &O) const;
+  virtual void print(std::ostream &O, const Module* = 0) const;
 
   // getRootInterval() - Return the root interval that contains the starting
   // block of the function.
index 32351ea55ce70d35104c5cde3d7acb8973231cfc..0be3ddb3a0e1b2cf9c18ffb721ad0fc54d38fb07 100644 (file)
@@ -241,7 +241,7 @@ public:
   virtual bool runOnFunction(Function &F);
 
   virtual void releaseMemory();
-  void print(std::ostream &O) const;
+  void print(std::ostream &O, const Module* = 0) const;
 
   /// getAnalysisUsage - Requires dominator sets
   ///
index d72405d24da4143e2e0117fa6bb3e5769cfef057..3a97e91bd7f48aa1a465eede88565e78ff0b9c2f 100644 (file)
@@ -202,7 +202,7 @@ namespace llvm {
     virtual bool runOnFunction(Function &F);
     virtual void releaseMemory();
     virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-    virtual void print(std::ostream &OS) const;
+    virtual void print(std::ostream &OS, const Module* = 0) const;
   };
 }
 
index 036ca132d22c0502082376cd650be6b1b964fb31..815600861f52e614a8c030426c30776a2a7c0a58 100644 (file)
@@ -128,7 +128,7 @@ namespace llvm {
     virtual bool runOnMachineFunction(MachineFunction&);
 
     /// print - Implement the dump method.
-    virtual void print(std::ostream &O) const;
+    virtual void print(std::ostream &O, const Module* = 0) const;
 
   private:
     /// computeIntervals - compute live intervals
index ff710d37664ea909c50741e198cfdd19c3ea3cea..0855986fbb6aca1c4a9621faceb4dd12ab0960a7 100644 (file)
@@ -96,8 +96,7 @@ public:
   /// provide the Module* in case the analysis doesn't need it it can just be
   /// ignored.
   ///
-  virtual void print(std::ostream &O, const Module *M) const { print(O); }
-  virtual void print(std::ostream &O) const;
+  virtual void print(std::ostream &O, const Module *M) const;
   void dump() const; // dump - call print(std::cerr, 0);
 
 
index b277634e6c58ccf27fc9de038bd6b5c7cd305157..85937adb3896bf3222a03b9e918a68fcb598cf41 100644 (file)
@@ -539,7 +539,7 @@ namespace {
     }
 
     /// print - Convert to human readable form
-    virtual void print(std::ostream &OS) const {
+    virtual void print(std::ostream &OS, const Module* = 0) const {
       Tracker->print(OS);
     }
 
index 88f9843c0be2e0deeb83735c8328bc5caf99d865..c19bbad55c61161e647d84cd554d5fc504640a65 100644 (file)
@@ -101,7 +101,7 @@ namespace {
       return false;
     }
 
-    void print(std::ostream &OS) const {}
+    void print(std::ostream &OS, const Module* = 0) const {}
     
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
@@ -119,7 +119,7 @@ namespace {
       CFGOnly = OldCFGOnly;
       return false;
     }
-    void print(std::ostream &OS) const {}
+    void print(std::ostream &OS, const Module* = 0) const {}
     
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
index 7e3f85f3a690e8263e1f6fd0dfd6518ddd979cc8..330362ee8f72c991870002336f42481ef38bc18e 100644 (file)
@@ -57,7 +57,7 @@ namespace {
     void visitStore(StoreInst &SI);
 
     /// Debugging support methods
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
   };
 
   static RegisterAnalysis<DSGraphStats> Z("dsstats", "DS Graph Statistics");
index 6793b0ecdb436735b95c372abc07367b91bc26d0..e1217bd091d0ccf61449472950d90f10c13492bf 100644 (file)
@@ -424,7 +424,7 @@ void IPModRef::getAnalysisUsage(AnalysisUsage &AU) const {
 }
 
 
-void IPModRef::print(std::ostream &O) const
+void IPModRef::print(std::ostream &O, const Module*) const
 {
   O << "\nRESULTS OF INTERPROCEDURAL MOD/REF ANALYSIS:\n\n";
   
index f8ac15c1bed943d9368d13eab6d929219bf67277..bb674a0591bc8c8d82746b5d214c0619a36fce7c 100644 (file)
@@ -213,7 +213,7 @@ public:
 
   // Debugging support methods
   // 
-  void print(std::ostream &O) const;
+  void print(std::ostream &O, const Module* = 0) const;
   void dump() const;
 
   /// releaseMemory - Release memory held by this pass when the pass pipeline is
index f6c54fb5bbf3266a8d9cdad96623ab3bc5b6b5de..51485dab891f834063da7b05d0f213607725cc65 100644 (file)
@@ -405,7 +405,7 @@ void MemoryDepAnalysis::ProcessSCC(std::vector<BasicBlock*> &S,
 
 /// Debugging support methods
 /// 
-void MemoryDepAnalysis::print(std::ostream &O) const
+void MemoryDepAnalysis::print(std::ostream &O, const Module*) const
 {
   // TEMPORARY LOOP
   for (hash_map<Function*, DependenceGraph*>::const_iterator
index ed21e5f687a00ce4f0232fd21ecc190d1851d28c..3123bee6cca02598c5ed8a56cf2b1f798a8744d5 100644 (file)
@@ -94,7 +94,7 @@ public:
 
   /// Debugging support methods
   /// 
-  void print(std::ostream &O) const;
+  void print(std::ostream &O, const Module* = 0) const;
   void dump() const;
 };
 
index 102c72bc47afa5aa22cf1cd411e9b1588516572d..69201c2df92e3df1a693346c3e480e93d84161e6 100644 (file)
@@ -222,7 +222,7 @@ void PgmDependenceGraph::printOutgoingSSADeps(Instruction& I,
 }
 
 
-void PgmDependenceGraph::print(std::ostream &O) const
+void PgmDependenceGraph::print(std::ostream &O, const Module*) const
 {
   MemoryDepAnalysis& graphSet = getAnalysis<MemoryDepAnalysis>();
 
index d7774943bd93c6dd8c37257f0413616d2c7db89d..a56a7d323ffc3a1c7fdf3a26068d11f9ea1ac226 100644 (file)
@@ -292,7 +292,7 @@ public:
 
   /// Debugging support methods
   /// 
-  void print(std::ostream &O) const;
+  void print(std::ostream &O, const Module* = 0) const;
   void dump() const;
 };
 
index 5fe1eecde2bb57384acf68392fb92378024082d1..d37c4caa836186ea6c51e8ce7dfd85932da3d1a1 100644 (file)
@@ -37,7 +37,7 @@ namespace {
   struct CFGSCC : public FunctionPass {
     bool runOnFunction(Function& func);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
@@ -48,7 +48,7 @@ namespace {
     // run - Print out SCCs in the call graph for the specified module.
     bool runOnModule(Module &M);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     // getAnalysisUsage - This pass requires the CallGraph.
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
index 4f178f4f64f8c2bf21c1e1a9af32913a58a8fc3f..eb2c06cc64c427f91123e3a38ae12127fe0f2f92 100644 (file)
@@ -32,7 +32,7 @@ void IntervalPartition::destroy() {
   RootInterval = 0;
 }
 
-void IntervalPartition::print(std::ostream &O) const {
+void IntervalPartition::print(std::ostream &O, const Module*) const {
   std::copy(Intervals.begin(), Intervals.end(),
             std::ostream_iterator<const Interval *>(O, "\n"));
 }
index 0444c84ec223f00ad262da7d1f01194dbbd82aa3..156d8b1bace4092a71cc64a2b83bcb797d889911 100644 (file)
@@ -119,7 +119,7 @@ void LoopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.addRequired<DominatorSet>();
 }
 
-void LoopInfo::print(std::ostream &OS) const {
+void LoopInfo::print(std::ostream &OS, const Module* ) const {
   for (unsigned i = 0; i < TopLevelLoops.size(); ++i)
     TopLevelLoops[i]->print(OS);
 #if 0
index 757211639bf2bb3ece16a0f568903e2da9c01f15..ad08489cdb3637e41223faec39ea2f3786c12827 100644 (file)
@@ -2326,7 +2326,7 @@ static void PrintLoopInfo(std::ostream &OS, const ScalarEvolution *SE,
   std::cerr << "\n";
 }
 
-void ScalarEvolution::print(std::ostream &OS) const {
+void ScalarEvolution::print(std::ostream &OS, const Module* ) const {
   Function &F = ((ScalarEvolutionsImpl*)Impl)->F;
   LoopInfo &LI = ((ScalarEvolutionsImpl*)Impl)->LI;
 
index 713f2f892d5d7c94a8462aa3b5896cc2cfb606c5..df3c6c2b439c1c813f989a4f6a3f48bc7edb43f4 100644 (file)
@@ -169,7 +169,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
 }
 
 /// print - Implement the dump method.
-void LiveIntervals::print(std::ostream &O) const {
+void LiveIntervals::print(std::ostream &O, const Module* ) const {
   O << "********** INTERVALS **********\n";
   for (const_iterator I = begin(), E = end(); I != E; ++I)
     O << "  " << I->second << "\n";
index 036ca132d22c0502082376cd650be6b1b964fb31..815600861f52e614a8c030426c30776a2a7c0a58 100644 (file)
@@ -128,7 +128,7 @@ namespace llvm {
     virtual bool runOnMachineFunction(MachineFunction&);
 
     /// print - Implement the dump method.
-    virtual void print(std::ostream &O) const;
+    virtual void print(std::ostream &O, const Module* = 0) const;
 
   private:
     /// computeIntervals - compute live intervals
index a120db40bd6f01d5c40f1330f2b2c8e0a21c8709..b70c7b5155799cf0c309553dfd522f6310fc14a3 100644 (file)
@@ -210,7 +210,7 @@ bool ImmediateDominators::runOnFunction(Function &F) {
   return false;
 }
 
-void ImmediateDominatorsBase::print(std::ostream &o) const {
+void ImmediateDominatorsBase::print(std::ostream &o, const Module* ) const {
   Function *F = getRoots()[0]->getParent();
   for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
     o << "  Immediate Dominator For Basic Block:";
@@ -313,7 +313,7 @@ static std::ostream &operator<<(std::ostream &o,
 }
 }
 
-void DominatorSetBase::print(std::ostream &o) const {
+void DominatorSetBase::print(std::ostream &o, const Module* ) const {
   for (const_iterator I = begin(), E = end(); I != E; ++I) {
     o << "  DomSet For BB: ";
     if (I->first)
@@ -408,7 +408,7 @@ static void PrintDomTree(const DominatorTreeBase::Node *N, std::ostream &o,
     PrintDomTree(*I, o, Lev+1);
 }
 
-void DominatorTreeBase::print(std::ostream &o) const {
+void DominatorTreeBase::print(std::ostream &o, const Module* ) const {
   o << "=============================--------------------------------\n"
     << "Inorder Dominator Tree:\n";
   PrintDomTree(getRootNode(), o, 1);
@@ -455,7 +455,7 @@ DominanceFrontier::calculate(const DominatorTree &DT,
   return S;
 }
 
-void DominanceFrontierBase::print(std::ostream &o) const {
+void DominanceFrontierBase::print(std::ostream &o, const Module* ) const {
   for (const_iterator I = begin(), E = end(); I != E; ++I) {
     o << "  DomFrontier for BB";
     if (I->first)
index 87748d83b4753ddd0ce2842c1408c7ffdf7e4516..acde824a79ef6c4cf2ba2745ce006495301fd926 100644 (file)
@@ -217,7 +217,7 @@ const char *Pass::getPassName() const {
 // to print out the contents of an analysis.  Otherwise it is not necessary to
 // implement this method.
 //
-void Pass::print(std::ostream &O) const {
+void Pass::print(std::ostream &O,const Module*) const {
   O << "Pass::print not implemented for pass: '" << getPassName() << "'!\n";
 }
 
index 5fe1eecde2bb57384acf68392fb92378024082d1..d37c4caa836186ea6c51e8ce7dfd85932da3d1a1 100644 (file)
@@ -37,7 +37,7 @@ namespace {
   struct CFGSCC : public FunctionPass {
     bool runOnFunction(Function& func);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
@@ -48,7 +48,7 @@ namespace {
     // run - Print out SCCs in the call graph for the specified module.
     bool runOnModule(Module &M);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     // getAnalysisUsage - This pass requires the CallGraph.
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
index 5fe1eecde2bb57384acf68392fb92378024082d1..d37c4caa836186ea6c51e8ce7dfd85932da3d1a1 100644 (file)
@@ -37,7 +37,7 @@ namespace {
   struct CFGSCC : public FunctionPass {
     bool runOnFunction(Function& func);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesAll();
@@ -48,7 +48,7 @@ namespace {
     // run - Print out SCCs in the call graph for the specified module.
     bool runOnModule(Module &M);
 
-    void print(std::ostream &O) const { }
+    void print(std::ostream &O, const Module* = 0) const { }
 
     // getAnalysisUsage - This pass requires the CallGraph.
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {