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:
/// print - Convert to human readable form
///
/// print - Convert to human readable form
///
- virtual void print(std::ostream &OS) const;
+ virtual void print(std::ostream &OS, const Module* = 0) const;
};
//===-------------------------------------
};
//===-------------------------------------
/// print - Convert to human readable form
///
/// 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.
/// dominates - Return true if A dominates B. This performs the special
/// checks necessary if A and B are in the same basic block.
/// print - Convert to human readable form
///
/// print - Convert to human readable form
///
- virtual void print(std::ostream &OS) const;
+ virtual void print(std::ostream &OS, const Module* = 0) const;
/// print - Convert to human readable form
///
/// print - Convert to human readable form
///
- virtual void print(std::ostream &OS) const;
+ virtual void print(std::ostream &OS, const Module* = 0) const;
~IntervalPartition() { destroy(); }
// print - Show contents in human readable format...
~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.
// getRootInterval() - Return the root interval that contains the starting
// block of the function.
virtual bool runOnFunction(Function &F);
virtual void releaseMemory();
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
///
/// getAnalysisUsage - Requires dominator sets
///
virtual bool runOnFunction(Function &F);
virtual void releaseMemory();
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
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;
virtual bool runOnMachineFunction(MachineFunction&);
/// print - Implement the dump method.
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
private:
/// computeIntervals - compute live intervals
/// provide the Module* in case the analysis doesn't need it it can just be
/// ignored.
///
/// 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);
void dump() const; // dump - call print(std::cerr, 0);
}
/// print - Convert to human readable form
}
/// print - Convert to human readable form
- virtual void print(std::ostream &OS) const {
+ virtual void print(std::ostream &OS, const Module* = 0) const {
- void print(std::ostream &OS) const {}
+ void print(std::ostream &OS, const Module* = 0) const {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
CFGOnly = OldCFGOnly;
return false;
}
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();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
void visitStore(StoreInst &SI);
/// Debugging support methods
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");
};
static RegisterAnalysis<DSGraphStats> Z("dsstats", "DS Graph Statistics");
-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";
{
O << "\nRESULTS OF INTERPROCEDURAL MOD/REF ANALYSIS:\n\n";
// Debugging support methods
//
// 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
void dump() const;
/// releaseMemory - Release memory held by this pass when the pass pipeline is
/// Debugging support methods
///
/// 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
{
// TEMPORARY LOOP
for (hash_map<Function*, DependenceGraph*>::const_iterator
/// Debugging support methods
///
/// Debugging support methods
///
- void print(std::ostream &O) const;
+ void print(std::ostream &O, const Module* = 0) const;
-void PgmDependenceGraph::print(std::ostream &O) const
+void PgmDependenceGraph::print(std::ostream &O, const Module*) const
{
MemoryDepAnalysis& graphSet = getAnalysis<MemoryDepAnalysis>();
{
MemoryDepAnalysis& graphSet = getAnalysis<MemoryDepAnalysis>();
/// Debugging support methods
///
/// Debugging support methods
///
- void print(std::ostream &O) const;
+ void print(std::ostream &O, const Module* = 0) const;
struct CFGSCC : public FunctionPass {
bool runOnFunction(Function& func);
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();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
// run - Print out SCCs in the call graph for the specified module.
bool runOnModule(Module &M);
// 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 {
// getAnalysisUsage - This pass requires the CallGraph.
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
-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"));
}
std::copy(Intervals.begin(), Intervals.end(),
std::ostream_iterator<const Interval *>(O, "\n"));
}
AU.addRequired<DominatorSet>();
}
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
for (unsigned i = 0; i < TopLevelLoops.size(); ++i)
TopLevelLoops[i]->print(OS);
#if 0
-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;
Function &F = ((ScalarEvolutionsImpl*)Impl)->F;
LoopInfo &LI = ((ScalarEvolutionsImpl*)Impl)->LI;
}
/// print - Implement the dump method.
}
/// 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";
O << "********** INTERVALS **********\n";
for (const_iterator I = begin(), E = end(); I != E; ++I)
O << " " << I->second << "\n";
virtual bool runOnMachineFunction(MachineFunction&);
/// print - Implement the dump method.
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
private:
/// computeIntervals - compute live intervals
-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:";
Function *F = getRoots()[0]->getParent();
for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) {
o << " Immediate Dominator For Basic Block:";
-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)
for (const_iterator I = begin(), E = end(); I != E; ++I) {
o << " DomSet For BB: ";
if (I->first)
PrintDomTree(*I, o, Lev+1);
}
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);
o << "=============================--------------------------------\n"
<< "Inorder Dominator Tree:\n";
PrintDomTree(getRootNode(), o, 1);
-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)
for (const_iterator I = begin(), E = end(); I != E; ++I) {
o << " DomFrontier for BB";
if (I->first)
// to print out the contents of an analysis. Otherwise it is not necessary to
// implement this method.
//
// 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";
}
O << "Pass::print not implemented for pass: '" << getPassName() << "'!\n";
}
struct CFGSCC : public FunctionPass {
bool runOnFunction(Function& func);
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();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
// run - Print out SCCs in the call graph for the specified module.
bool runOnModule(Module &M);
// 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 {
// getAnalysisUsage - This pass requires the CallGraph.
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
struct CFGSCC : public FunctionPass {
bool runOnFunction(Function& func);
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();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
// run - Print out SCCs in the call graph for the specified module.
bool runOnModule(Module &M);
// 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 {
// getAnalysisUsage - This pass requires the CallGraph.
virtual void getAnalysisUsage(AnalysisUsage &AU) const {