Move more to raw_ostream, provide support for writing MachineBasicBlock,
[oota-llvm.git] / include / llvm / CodeGen / LiveInterval.h
index 6910f418767524ef01d4f767f55d98914477c8ac..20943d5aa6da48f4aef338653c83916a8337eb85 100644 (file)
@@ -32,6 +32,7 @@ namespace llvm {
   class MachineInstr;
   class MachineRegisterInfo;
   class TargetRegisterInfo;
+  class raw_ostream;
 
   /// VNInfo - Value Number Information.
   /// This class holds information about a machine level values, including
@@ -192,12 +193,15 @@ namespace llvm {
     void dump() const;
     void print(std::ostream &os) const;
     void print(std::ostream *os) const { if (os) print(*os); }
+    void print(raw_ostream &os) const;
+    void print(raw_ostream *os) const { if (os) print(*os); }
 
   private:
     LiveRange(); // DO NOT IMPLEMENT
   };
 
   std::ostream& operator<<(std::ostream& os, const LiveRange &LR);
+  raw_ostream& operator<<(raw_ostream& os, const LiveRange &LR);
 
 
   inline bool operator<(unsigned V, const LiveRange &LR) {
@@ -584,6 +588,10 @@ namespace llvm {
     void print(std::ostream *OS, const TargetRegisterInfo *TRI = 0) const {
       if (OS) print(*OS, TRI);
     }
+    void print(raw_ostream &OS, const TargetRegisterInfo *TRI = 0) const;
+    void print(raw_ostream *OS, const TargetRegisterInfo *TRI = 0) const {
+      if (OS) print(*OS, TRI);
+    }
     void dump() const;
 
   private:
@@ -599,6 +607,10 @@ namespace llvm {
     LI.print(OS);
     return OS;
   }
+  inline raw_ostream &operator<<(raw_ostream &OS, const LiveInterval &LI) {
+    LI.print(OS);
+    return OS;
+  }
 }
 
 #endif