diff options
| author | Bill Wendling <isanbard@gmail.com> | 2006-11-28 22:45:17 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2006-11-28 22:45:17 +0000 |
| commit | a60d8edfc9459b1c63e8efb017ee3b371de50ced (patch) | |
| tree | b1718739f70276518d707805e6231b05c6db6473 | |
| parent | 228bcd3802906488c45f1cbc4c92755c034ab533 (diff) | |
| download | bcm5719-llvm-a60d8edfc9459b1c63e8efb017ee3b371de50ced.tar.gz bcm5719-llvm-a60d8edfc9459b1c63e8efb017ee3b371de50ced.zip | |
Support for llvm streams.
llvm-svn: 31982
| -rw-r--r-- | llvm/include/llvm/Analysis/LoopInfo.h | 6 | ||||
| -rw-r--r-- | llvm/include/llvm/Analysis/Trace.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index 2f3fc47b977..2e6d2471fcb 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -217,6 +217,9 @@ public: /// the mapping in the LoopInfo class. void removeBlockFromLoop(BasicBlock *BB); + void print(llvm_ostream &O, unsigned Depth = 0) const { + if (O.stream()) print(*O.stream(), Depth); + } void print(std::ostream &O, unsigned Depth = 0) const; void dump() const; private: @@ -280,6 +283,9 @@ public: virtual bool runOnFunction(Function &F); virtual void releaseMemory(); + void print(llvm_ostream &O, const Module* = 0) const { + if (O.stream()) print(*O.stream()); + } void print(std::ostream &O, const Module* = 0) const; virtual void getAnalysisUsage(AnalysisUsage &AU) const; diff --git a/llvm/include/llvm/Analysis/Trace.h b/llvm/include/llvm/Analysis/Trace.h index 32d36296712..ad4f37ce4d8 100644 --- a/llvm/include/llvm/Analysis/Trace.h +++ b/llvm/include/llvm/Analysis/Trace.h @@ -18,11 +18,11 @@ #ifndef LLVM_ANALYSIS_TRACE_H #define LLVM_ANALYSIS_TRACE_H -#include <iosfwd> #include <vector> #include <cassert> namespace llvm { + class llvm_ostream; class BasicBlock; class Function; class Module; @@ -106,7 +106,7 @@ public: /// print - Write trace to output stream. /// - void print (std::ostream &O) const; + void print (llvm_ostream &O) const; /// dump - Debugger convenience method; writes trace to standard error /// output stream. |

