aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-05 10:38:28 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-05 10:38:28 +0000
commitb27ef248f579b354aab434f63c417ab1103e47e2 (patch)
tree3e884b95c4568fe30159e7f1fd548c2f01bd9bc6 /lib/CodeGen/LiveIntervalAnalysis.cpp
parent91ceae6d2060367a5212b15b26faa804ea0448a5 (diff)
Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index ec15c0823e..c9f7b34c0b 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -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;
+}