Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Fri, 5 Dec 2003 10:38:28 +0000 (10:38 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Fri, 5 Dec 2003 10:38:28 +0000 (10:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10290 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/CodeGen/LiveIntervals.h
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/LiveIntervalAnalysis.h

index b2f0416312ad171154332c505e9ba3598f42b455..2be89fda5bdd03350dd15a15a9c550550524afb5 100644 (file)
@@ -196,15 +196,8 @@ namespace llvm {
         return lhs.reg == rhs.reg;
     }
 
-    inline std::ostream& operator<<(std::ostream& os,
-                                    const LiveIntervals::Interval& li) {
-        os << "%reg" << li.reg << " = ";
-        for (LiveIntervals::Interval::Ranges::const_iterator
-                 i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) {
-            os << "[" << i->first << ", " << i->second << "]";
-        }
-        return os;
-    }
+    std::ostream& operator<<(std::ostream& os,
+                             const LiveIntervals::Interval& li);
 
 } // End llvm namespace
 
index b2f0416312ad171154332c505e9ba3598f42b455..2be89fda5bdd03350dd15a15a9c550550524afb5 100644 (file)
@@ -196,15 +196,8 @@ namespace llvm {
         return lhs.reg == rhs.reg;
     }
 
-    inline std::ostream& operator<<(std::ostream& os,
-                                    const LiveIntervals::Interval& li) {
-        os << "%reg" << li.reg << " = ";
-        for (LiveIntervals::Interval::Ranges::const_iterator
-                 i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) {
-            os << "[" << i->first << ", " << i->second << "]";
-        }
-        return os;
-    }
+    std::ostream& operator<<(std::ostream& os,
+                             const LiveIntervals::Interval& li);
 
 } // End llvm namespace
 
index ec15c0823e503534bb044cbb01586b6a4064a76b..c9f7b34c0b75f09bdbd403cc8333bc228daf49d0 100644 (file)
@@ -301,3 +301,14 @@ void LiveIntervals::computeIntervals()
     DEBUG(std::copy(intervals_.begin(), intervals_.end(),
                     std::ostream_iterator<Interval>(std::cerr, "\n")));
 }
+
+std::ostream& llvm::operator<<(std::ostream& os,
+                               const LiveIntervals::Interval& li)
+{
+    os << "%reg" << li.reg << " = ";
+    for (LiveIntervals::Interval::Ranges::const_iterator
+             i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) {
+        os << "[" << i->first << "," << i->second << "]";
+    }
+    return os;
+}
index b2f0416312ad171154332c505e9ba3598f42b455..2be89fda5bdd03350dd15a15a9c550550524afb5 100644 (file)
@@ -196,15 +196,8 @@ namespace llvm {
         return lhs.reg == rhs.reg;
     }
 
-    inline std::ostream& operator<<(std::ostream& os,
-                                    const LiveIntervals::Interval& li) {
-        os << "%reg" << li.reg << " = ";
-        for (LiveIntervals::Interval::Ranges::const_iterator
-                 i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) {
-            os << "[" << i->first << ", " << i->second << "]";
-        }
-        return os;
-    }
+    std::ostream& operator<<(std::ostream& os,
+                             const LiveIntervals::Interval& li);
 
 } // End llvm namespace