diff --git a/llvm/include/llvm/Analysis/Dominators.h b/llvm/include/llvm/Analysis/Dominators.h index c1cdae50f235..c9019114954e 100644 --- a/llvm/include/llvm/Analysis/Dominators.h +++ b/llvm/include/llvm/Analysis/Dominators.h @@ -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; }; diff --git a/llvm/include/llvm/Analysis/IntervalPartition.h b/llvm/include/llvm/Analysis/IntervalPartition.h index 408ace2e7ef4..d5dd64eca717 100644 --- a/llvm/include/llvm/Analysis/IntervalPartition.h +++ b/llvm/include/llvm/Analysis/IntervalPartition.h @@ -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. diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index 32351ea55ce7..0be3ddb3a0e1 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -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 /// diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index d72405d24da4..3a97e91bd7f4 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -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; }; } diff --git a/llvm/include/llvm/Pass.h b/llvm/include/llvm/Pass.h index ff710d37664e..0855986fbb6a 100644 --- a/llvm/include/llvm/Pass.h +++ b/llvm/include/llvm/Pass.h @@ -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); diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index b277634e6c58..85937adb3896 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -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); } diff --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp index 88f9843c0be2..c19bbad55c61 100644 --- a/llvm/lib/Analysis/CFGPrinter.cpp +++ b/llvm/lib/Analysis/CFGPrinter.cpp @@ -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(); diff --git a/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp b/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp index 7e3f85f3a690..330362ee8f72 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -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 Z("dsstats", "DS Graph Statistics"); diff --git a/llvm/lib/Analysis/DataStructure/IPModRef.cpp b/llvm/lib/Analysis/DataStructure/IPModRef.cpp index 6793b0ecdb43..e1217bd091d0 100644 --- a/llvm/lib/Analysis/DataStructure/IPModRef.cpp +++ b/llvm/lib/Analysis/DataStructure/IPModRef.cpp @@ -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"; diff --git a/llvm/lib/Analysis/DataStructure/IPModRef.h b/llvm/lib/Analysis/DataStructure/IPModRef.h index f8ac15c1bed9..bb674a0591bc 100644 --- a/llvm/lib/Analysis/DataStructure/IPModRef.h +++ b/llvm/lib/Analysis/DataStructure/IPModRef.h @@ -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 diff --git a/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp b/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp index f6c54fb5bbf3..51485dab891f 100644 --- a/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp +++ b/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp @@ -405,7 +405,7 @@ void MemoryDepAnalysis::ProcessSCC(std::vector &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::const_iterator diff --git a/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h b/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h index ed21e5f687a0..3123bee6cca0 100644 --- a/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h +++ b/llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h @@ -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; }; diff --git a/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp b/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp index 102c72bc47af..69201c2df92e 100644 --- a/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp +++ b/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp @@ -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(); diff --git a/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h b/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h index d7774943bd93..a56a7d323ffc 100644 --- a/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h +++ b/llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h @@ -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; }; diff --git a/llvm/lib/Analysis/IPA/PrintSCC.cpp b/llvm/lib/Analysis/IPA/PrintSCC.cpp index 5fe1eecde2bb..d37c4caa8361 100644 --- a/llvm/lib/Analysis/IPA/PrintSCC.cpp +++ b/llvm/lib/Analysis/IPA/PrintSCC.cpp @@ -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 { diff --git a/llvm/lib/Analysis/IntervalPartition.cpp b/llvm/lib/Analysis/IntervalPartition.cpp index 4f178f4f64f8..eb2c06cc64c4 100644 --- a/llvm/lib/Analysis/IntervalPartition.cpp +++ b/llvm/lib/Analysis/IntervalPartition.cpp @@ -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(O, "\n")); } diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index 0444c84ec223..156d8b1bace4 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -119,7 +119,7 @@ void LoopInfo::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); } -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 diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 757211639bf2..ad08489cdb36 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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; diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 713f2f892d5d..df3c6c2b439c 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -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"; diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.h b/llvm/lib/CodeGen/LiveIntervalAnalysis.h index 036ca132d22c..815600861f52 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.h +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.h @@ -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 diff --git a/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp index a120db40bd6f..b70c7b515579 100644 --- a/llvm/lib/VMCore/Dominators.cpp +++ b/llvm/lib/VMCore/Dominators.cpp @@ -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) diff --git a/llvm/lib/VMCore/Pass.cpp b/llvm/lib/VMCore/Pass.cpp index 87748d83b475..acde824a79ef 100644 --- a/llvm/lib/VMCore/Pass.cpp +++ b/llvm/lib/VMCore/Pass.cpp @@ -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"; }