From bdafcc633dc967af204f1b1e9ca2d26e1732cf59 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Wed, 21 Jul 2010 09:02:06 +0000 Subject: Changed OStream templates to functions on raw_ostream, removed the unused "renderWarnings" function. llvm-svn: 109003 --- llvm/lib/CodeGen/RenderMachineFunction.cpp | 37 ++++++++++-------------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'llvm/lib/CodeGen/RenderMachineFunction.cpp') diff --git a/llvm/lib/CodeGen/RenderMachineFunction.cpp b/llvm/lib/CodeGen/RenderMachineFunction.cpp index 0f5f67d..9bcbfb4 100644 --- a/llvm/lib/CodeGen/RenderMachineFunction.cpp +++ b/llvm/lib/CodeGen/RenderMachineFunction.cpp @@ -499,8 +499,7 @@ namespace llvm { // ---------- MachineFunctionRenderer implementation ---------- - template - void RenderMachineFunction::Spacer::print(OStream &os) const { + void RenderMachineFunction::Spacer::print(raw_ostream &os) const { if (!prettyHTML) return; for (unsigned i = 0; i < ns; ++i) { @@ -512,8 +511,7 @@ namespace llvm { return Spacer(ns); } - template - OStream& operator<<(OStream &os, const RenderMachineFunction::Spacer &s) { + raw_ostream& operator<<(raw_ostream &os, const RenderMachineFunction::Spacer &s) { s.print(os); return os; } @@ -583,8 +581,7 @@ namespace llvm { } /// \brief Render a machine instruction. - template - void RenderMachineFunction::renderMachineInstr(OStream &os, + void RenderMachineFunction::renderMachineInstr(raw_ostream &os, const MachineInstr *mi) const { std::string s; raw_string_ostream oss(s); @@ -593,9 +590,9 @@ namespace llvm { os << escapeChars(oss.str()); } - template + template void RenderMachineFunction::renderVertical(const Spacer &indent, - OStream &os, + raw_ostream &os, const T &t) const { if (ro.fancyVerticals()) { os << indent << " void RenderMachineFunction::insertCSS(const Spacer &indent, - OStream &os) const { + raw_ostream &os) const { os << indent << "\n"; } - template void RenderMachineFunction::renderFunctionSummary( - const Spacer &indent, OStream &os, + const Spacer &indent, raw_ostream &os, const char * const renderContextStr) const { os << indent << "

Function: " << mf->getFunction()->getName() << "

\n" @@ -657,10 +652,9 @@ namespace llvm { } - template void RenderMachineFunction::renderPressureTableLegend( const Spacer &indent, - OStream &os) const { + raw_ostream &os) const { os << indent << "

Rendering Pressure Legend:

\n" << indent << "\n" << indent + s(2) << "\n" @@ -685,9 +679,9 @@ namespace llvm { << indent << "
\n"; } - template + template void RenderMachineFunction::renderCellsWithRLE( - const Spacer &indent, OStream &os, + const Spacer &indent, raw_ostream &os, const std::pair &rleAccumulator, const std::map &cellTypeStrs) const { @@ -706,9 +700,8 @@ namespace llvm { } - template void RenderMachineFunction::renderCodeTablePlusPI(const Spacer &indent, - OStream &os) const { + raw_ostream &os) const { std::map lsStrs; lsStrs[Dead] = "l-n"; @@ -854,14 +847,8 @@ namespace llvm { renderPressureTableLegend(indent, os); } - template - void RenderMachineFunction::renderWarnings(const Spacer &indent, - OStream &os) const { - } - - template void RenderMachineFunction::renderFunctionPage( - OStream &os, + raw_ostream &os, const char * const renderContextStr) const { os << "\n" << s(2) << "\n" -- cgit v1.1