Support for llvm streams.
authorBill Wendling <isanbard@gmail.com>
Tue, 28 Nov 2006 22:45:17 +0000 (22:45 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 28 Nov 2006 22:45:17 +0000 (22:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31982 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/Trace.h

index 2f3fc47b977518b6d91f783ea4fabced9ebfcd33..2e6d2471fcb947830333a50786bcea653fac22ec 100644 (file)
@@ -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;
index 32d36296712b79c16cb5c4489958cb96605219b0..ad4f37ce4d8bca92245cdd8dea7d64c8b1018156 100644 (file)
 #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.