rename DenseMap to IndexedMap.
[oota-llvm.git] / include / llvm / CodeGen / LiveInterval.h
index 8181a2093d4426bbd45270f48c49f36a8741e3f7..367cefeb36c0601b1d247eea85c175b73b9534f8 100644 (file)
@@ -26,7 +26,6 @@
 #include <iosfwd>
 #include <vector>
 #include <cassert>
-#include <ostream>
 
 namespace llvm {
   class MRegisterInfo;
@@ -57,16 +56,15 @@ namespace llvm {
     }
 
     void dump() const;
+    void print(std::ostream &os) const;
+    void print(std::ostream *os) const { if (os) print(*os); }
 
   private:
     LiveRange(); // DO NOT IMPLEMENT
   };
 
   std::ostream& operator<<(std::ostream& os, const LiveRange &LR);
-  inline OStream& operator<<(OStream& os, const LiveRange &LR) {
-    if (os.stream()) *os.stream() << LR;
-    return os;
-  }
+
 
   inline bool operator<(unsigned V, const LiveRange &LR) {
     return V < LR.start;
@@ -259,9 +257,9 @@ namespace llvm {
       return beginNumber() < other.beginNumber();
     }
 
-    void print(OStream OS, const MRegisterInfo *MRI = 0) const;
-    void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const {
-      print(OStream(OS), MRI);
+    void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const;
+    void print(std::ostream *OS, const MRegisterInfo *MRI = 0) const {
+      if (OS) print(*OS, MRI);
     }
     void dump() const;
 
@@ -272,11 +270,6 @@ namespace llvm {
     LiveInterval& operator=(const LiveInterval& rhs); // DO NOT IMPLEMENT
   };
 
-  inline OStream &operator<<(OStream &OS, const LiveInterval &LI) {
-    LI.print(OS);
-    return OS;
-  }
-
   inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
     LI.print(OS);
     return OS;