For PR387:\

Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual

llvm-svn: 18589
This commit is contained in:
Reid Spencer 2004-12-07 04:03:45 +00:00
parent 1c48c2deee
commit 9083936835
22 changed files with 30 additions and 31 deletions

View 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;
};

View 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.

View 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
///

View 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;
};
}

View 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);

View 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);
}

View 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();

View 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");

View 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";

View 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

View 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

View 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;
};

View 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>();

View 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;
};

View 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 {

View 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"));
}

View 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

View 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;

View 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";

View 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

View 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)

View 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";
}