aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/LoopInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 05:17:37 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 05:17:37 +0000
commit791102fb1192ac9483274e54cbc42480c9b1af10 (patch)
tree4729b1da9b9c946fb83bc177dd3d00bffcf85390 /include/llvm/Analysis/LoopInfo.h
parent79c5d3f9717756dc3ff56cfcaa3ae1a5930c457a (diff)
downloadexternal_llvm-791102fb1192ac9483274e54cbc42480c9b1af10.zip
external_llvm-791102fb1192ac9483274e54cbc42480c9b1af10.tar.gz
external_llvm-791102fb1192ac9483274e54cbc42480c9b1af10.tar.bz2
eliminate the std::ostream form of WriteAsOperand and update clients.
This also updates dominator related stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r--include/llvm/Analysis/LoopInfo.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index fb20406..5435226 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -454,8 +454,8 @@ public:
#endif
}
- void print(std::ostream &OS, unsigned Depth = 0) const {
- OS << std::string(Depth*2, ' ') << "Loop at depth " << getLoopDepth()
+ void print(raw_ostream &OS, unsigned Depth = 0) const {
+ OS.indent(Depth*2) << "Loop at depth " << getLoopDepth()
<< " containing: ";
for (unsigned i = 0; i < getBlocks().size(); ++i) {
@@ -472,12 +472,8 @@ public:
(*I)->print(OS, Depth+2);
}
- void print(std::ostream *O, unsigned Depth = 0) const {
- if (O) print(*O, Depth);
- }
-
void dump() const {
- print(cerr);
+ print(errs());
}
protected:
@@ -878,7 +874,7 @@ public:
// Debugging
- void print(std::ostream &OS, const Module* ) const {
+ void print(raw_ostream &OS) const {
for (unsigned i = 0; i < TopLevelLoops.size(); ++i)
TopLevelLoops[i]->print(OS);
#if 0
@@ -942,10 +938,8 @@ public:
virtual void releaseMemory() { LI.releaseMemory(); }
- virtual void print(std::ostream &O, const Module* M = 0) const {
- LI.print(O, M);
- }
-
+ virtual void print(std::ostream &O, const Module* M = 0) const;
+
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
/// removeLoop - This removes the specified top-level loop from this loop info