From: Alkis Evlogimenos Date: Fri, 5 Dec 2003 10:38:28 +0000 (+0000) Subject: Move operator<<(std::ostream&, const LiveInterval&) out of the header file. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b27ef248f579b354aab434f63c417ab1103e47e2;p=oota-llvm.git 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 --- diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index b2f0416312a..2be89fda5bd 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -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 diff --git a/include/llvm/CodeGen/LiveIntervals.h b/include/llvm/CodeGen/LiveIntervals.h index b2f0416312a..2be89fda5bd 100644 --- a/include/llvm/CodeGen/LiveIntervals.h +++ b/include/llvm/CodeGen/LiveIntervals.h @@ -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 diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index ec15c0823e5..c9f7b34c0b7 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(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; +} diff --git a/lib/CodeGen/LiveIntervalAnalysis.h b/lib/CodeGen/LiveIntervalAnalysis.h index b2f0416312a..2be89fda5bd 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.h +++ b/lib/CodeGen/LiveIntervalAnalysis.h @@ -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