[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h

Bill Wendling isanbard at gmail.com
Mon Nov 27 18:07:44 PST 2006



Changes in directory llvm/include/llvm/CodeGen:

LiveInterval.h updated: 1.26 -> 1.27
---
Log message:

Added helper function to transition to using llvm streams.


---
Diffs of the changes:  (+13 -2)

 LiveInterval.h |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/LiveInterval.h
diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.26 llvm/include/llvm/CodeGen/LiveInterval.h:1.27
--- llvm/include/llvm/CodeGen/LiveInterval.h:1.26	Wed Nov 15 20:43:32 2006
+++ llvm/include/llvm/CodeGen/LiveInterval.h	Mon Nov 27 20:07:29 2006
@@ -22,6 +22,7 @@
 #define LLVM_CODEGEN_LIVEINTERVAL_H
 
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Streams.h"
 #include <iosfwd>
 #include <vector>
 #include <cassert>
@@ -252,7 +253,11 @@
       return beginNumber() < other.beginNumber();
     }
 
-    void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const;
+    void print(llvm_ostream &OS, const MRegisterInfo *MRI = 0) const;
+    void print(std::ostream &OS, const MRegisterInfo *MRI = 0) const {
+      llvm_ostream L(OS);
+      L << MRI;
+    }
     void dump() const;
 
   private:
@@ -262,10 +267,16 @@
     LiveInterval& operator=(const LiveInterval& rhs); // DO NOT IMPLEMENT
   };
 
-  inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
+  inline llvm_ostream &operator<<(llvm_ostream &OS, const LiveInterval &LI) {
     LI.print(OS);
     return OS;
   }
+
+  inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
+    llvm_ostream L(OS);
+    L << LI;
+    return OS;
+  }
 }
 
 #endif






More information about the llvm-commits mailing list