aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/Writer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit697954c15da58bd8b186dbafdedd8b06db770201 (patch)
treee119a71f09b5c2513c8c270161ae2a858c6f3b96 /lib/Analysis/Writer.cpp
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
downloadexternal_llvm-697954c15da58bd8b186dbafdedd8b06db770201.zip
external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz
external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Writer.cpp')
-rw-r--r--lib/Analysis/Writer.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/Analysis/Writer.cpp b/lib/Analysis/Writer.cpp
index 3d9134f..1e873bf 100644
--- a/lib/Analysis/Writer.cpp
+++ b/lib/Analysis/Writer.cpp
@@ -12,6 +12,10 @@
#include "llvm/Analysis/InductionVariable.h"
#include <iterator>
#include <algorithm>
+using std::ostream;
+using std::set;
+using std::vector;
+using std::string;
//===----------------------------------------------------------------------===//
// Interval Printing Routines
@@ -23,19 +27,19 @@ void cfg::WriteToOutput(const Interval *I, ostream &o) {
// Print out all of the basic blocks in the interval...
copy(I->Nodes.begin(), I->Nodes.end(),
- ostream_iterator<BasicBlock*>(o, "\n"));
+ std::ostream_iterator<BasicBlock*>(o, "\n"));
o << "Interval Predecessors:\n";
copy(I->Predecessors.begin(), I->Predecessors.end(),
- ostream_iterator<BasicBlock*>(o, "\n"));
+ std::ostream_iterator<BasicBlock*>(o, "\n"));
o << "Interval Successors:\n";
copy(I->Successors.begin(), I->Successors.end(),
- ostream_iterator<BasicBlock*>(o, "\n"));
+ std::ostream_iterator<BasicBlock*>(o, "\n"));
}
void cfg::WriteToOutput(const IntervalPartition &IP, ostream &o) {
- copy(IP.begin(), IP.end(), ostream_iterator<const Interval *>(o, "\n"));
+ copy(IP.begin(), IP.end(), std::ostream_iterator<const Interval *>(o, "\n"));
}
@@ -45,7 +49,7 @@ void cfg::WriteToOutput(const IntervalPartition &IP, ostream &o) {
//===----------------------------------------------------------------------===//
ostream &operator<<(ostream &o, const set<const BasicBlock*> &BBs) {
- copy(BBs.begin(), BBs.end(), ostream_iterator<const BasicBlock*>(o, "\n"));
+ copy(BBs.begin(),BBs.end(), std::ostream_iterator<const BasicBlock*>(o,"\n"));
return o;
}
@@ -53,7 +57,7 @@ void cfg::WriteToOutput(const DominatorSet &DS, ostream &o) {
for (DominatorSet::const_iterator I = DS.begin(), E = DS.end(); I != E; ++I) {
o << "=============================--------------------------------\n"
<< "\nDominator Set For Basic Block\n" << I->first
- << "-------------------------------\n" << I->second << endl;
+ << "-------------------------------\n" << I->second << "\n";
}
}
@@ -63,7 +67,7 @@ void cfg::WriteToOutput(const ImmediateDominators &ID, ostream &o) {
I != E; ++I) {
o << "=============================--------------------------------\n"
<< "\nImmediate Dominator For Basic Block\n" << I->first
- << "is: \n" << I->second << endl;
+ << "is: \n" << I->second << "\n";
}
}
@@ -93,7 +97,7 @@ void cfg::WriteToOutput(const DominanceFrontier &DF, ostream &o) {
I != E; ++I) {
o << "=============================--------------------------------\n"
<< "\nDominance Frontier For Basic Block\n" << I->first
- << "is: \n" << I->second << endl;
+ << "is: \n" << I->second << "\n";
}
}
@@ -109,15 +113,15 @@ void cfg::WriteToOutput(const Loop *L, ostream &o) {
if (i) o << ",";
WriteAsOperand(o, (const Value*)L->getBlocks()[i]);
}
- o << endl;
+ o << "\n";
copy(L->getSubLoops().begin(), L->getSubLoops().end(),
- ostream_iterator<const Loop*>(o, "\n"));
+ std::ostream_iterator<const Loop*>(o, "\n"));
}
void cfg::WriteToOutput(const LoopInfo &LI, ostream &o) {
copy(LI.getTopLevelLoops().begin(), LI.getTopLevelLoops().end(),
- ostream_iterator<const Loop*>(o, "\n"));
+ std::ostream_iterator<const Loop*>(o, "\n"));
}
@@ -138,11 +142,11 @@ void WriteToOutput(const InductionVariable &IV, ostream &o) {
WriteAsOperand(o, (const Value*)IV.Phi);
o << ":\n" << (const Value*)IV.Phi;
} else {
- o << endl;
+ o << "\n";
}
if (IV.InductionType == InductionVariable::Unknown) return;
o << " Start ="; WriteAsOperand(o, IV.Start);
o << " Step =" ; WriteAsOperand(o, IV.Step);
- o << endl;
+ o << "\n";
}