An even better unbreakage...
authorJeff Cohen <jeffc@jolt-lang.org>
Fri, 15 Dec 2006 22:57:14 +0000 (22:57 +0000)
committerJeff Cohen <jeffc@jolt-lang.org>
Fri, 15 Dec 2006 22:57:14 +0000 (22:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32617 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveInterval.h
include/llvm/CodeGen/MachineBasicBlock.h
include/llvm/CodeGen/MachineInstr.h
lib/CodeGen/LiveInterval.cpp
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/MachineInstr.cpp

index 8181a2093d4426bbd45270f48c49f36a8741e3f7..a64af87d91227108809e37fa9e70c0d45b17311e 100644 (file)
@@ -26,7 +26,6 @@
 #include <iosfwd>
 #include <vector>
 #include <cassert>
-#include <ostream>
 
 namespace llvm {
   class MRegisterInfo;
@@ -63,10 +62,7 @@ namespace llvm {
   };
 
   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;
-  }
+  OStream& operator<<(OStream& os, const LiveRange &LR);
 
   inline bool operator<(unsigned V, const LiveRange &LR) {
     return V < LR.start;
index c848b065b46a1032b39f049618ac8c4331033ab0..4cf6a24e45041dbb7dd538fd6f4921ff472ec425 100644 (file)
@@ -226,10 +226,7 @@ private:   // Methods used to maintain doubly linked list of blocks...
 };
 
 std::ostream& operator<<(std::ostream &OS, const MachineBasicBlock &MBB);
-inline OStream& operator<<(OStream &OS, const MachineBasicBlock &MBB){
-  if (OS.stream()) *OS.stream() << MBB;
-  return OS;
-}
+OStream& operator<<(OStream &OS, const MachineBasicBlock &MBB);
 
 //===--------------------------------------------------------------------===//
 // GraphTraits specializations for machine basic block graphs (machine-CFGs)
index 181a6414a6113ebe6d6e69d01a3810955a46152f..e19a3ebfbe8e69d3434437952d10b1f408948b83 100644 (file)
@@ -22,7 +22,6 @@
 #include <vector>
 #include <cassert>
 #include <iosfwd>
-#include <ostream>
 
 namespace llvm {
 
@@ -286,10 +285,7 @@ public:
     IsDead = false;
   }
 
-  friend OStream& operator<<(OStream& os, const MachineOperand& mop) {
-    if (os.stream()) *os.stream() << mop;
-    return os;
-  }
+  friend OStream& operator<<(OStream& os, const MachineOperand& mop);
   friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);
 
   friend class MachineInstr;
@@ -403,10 +399,7 @@ public:
   }
   void print(std::ostream &OS, const TargetMachine *TM) const;
   void dump() const;
-  friend OStream& operator<<(OStream& os, const MachineInstr& minstr){
-    if (os.stream()) *os.stream() << minstr;
-    return os;
-  }
+  friend OStream& operator<<(OStream& os, const MachineInstr& minstr);
   friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr);
 
   //===--------------------------------------------------------------------===//
index e2a3bbaaf0bf69b7ab794f6b22f451ce5e7b5aac..78c874cbb93b704a4bb48990589feffa82e20f27 100644 (file)
@@ -24,6 +24,7 @@
 #include "llvm/Target/MRegisterInfo.h"
 #include <algorithm>
 #include <map>
+#include <ostream>
 using namespace llvm;
 
 // An example for liveAt():
@@ -509,3 +510,9 @@ void LiveInterval::print(OStream OS, const MRegisterInfo *MRI) const {
 void LiveInterval::dump() const {
   cerr << *this << "\n";
 }
+
+
+OStream& llvm::operator<<(OStream& os, const LiveRange &LR) {
+  if (os.stream()) *os.stream() << LR;
+  return os;
+}
index a626f4fdd15ca8a5694091c21f13e698bfb8a653..39b142a2f35844b78db932f5444130c1b25e6263 100644 (file)
@@ -31,6 +31,11 @@ std::ostream& llvm::operator<<(std::ostream &OS, const MachineBasicBlock &MBB) {
   return OS;
 }
 
+OStream& llvm::operator<<(OStream &OS, const MachineBasicBlock &MBB) {
+  if (OS.stream()) *OS.stream() << MBB;
+  return OS;
+}
+
 // MBBs start out as #-1. When a MBB is added to a MachineFunction, it
 // gets the next available unique MBB number. If it is removed from a
 // MachineFunction, it goes back to being #-1.
index 716b40fbf1c1dcdadf5090636db37d8368fd9d2f..a68442511b4ff07cb4a55afc98c44feec41c2b7f 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/Target/MRegisterInfo.h"
 #include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/Streams.h"
+#include <ostream>
 using namespace llvm;
 
 /// MachineInstr ctor - This constructor creates a dummy MachineInstr with
@@ -363,3 +364,14 @@ std::ostream &llvm::operator<<(std::ostream &OS, const MachineOperand &MO) {
 
   return OS;
 }
+
+OStream& llvm::operator<<(OStream& os, const MachineInstr& minstr) {
+  if (os.stream()) *os.stream() << minstr;
+  return os;
+}
+
+OStream& llvm::operator<<(OStream& os, const MachineOperand& mop) {
+  if (os.stream()) *os.stream() << mop;
+  return os;
+}
+