diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-23 06:03:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 06:03:38 +0000 |
commit | 45cfe545ec8177262dabc70580ce05feaa1c3880 (patch) | |
tree | d7e42a138f6f8b54e1a831aff3c73c653ee77784 /lib/CodeGen/SelectionDAG | |
parent | cb3e3d30054edfc7481bf323b315da4edc63bc44 (diff) | |
download | llvm-45cfe545ec8177262dabc70580ce05feaa1c3880.tar.gz llvm-45cfe545ec8177262dabc70580ce05feaa1c3880.tar.bz2 llvm-45cfe545ec8177262dabc70580ce05feaa1c3880.tar.xz |
Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/CallingConvLower.cpp | 24 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 13 |
3 files changed, 23 insertions, 19 deletions
diff --git a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp index 7a1eeb23d2..60c3056902 100644 --- a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp +++ b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp @@ -69,8 +69,8 @@ CCState::AnalyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &Ins, ISD::ArgFlagsTy ArgFlags = Ins[i].Flags; if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { #ifndef NDEBUG - cerr << "Formal argument #" << i << " has unhandled type " - << ArgVT.getEVTString(); + errs() << "Formal argument #" << i << " has unhandled type " + << ArgVT.getEVTString(); #endif llvm_unreachable(0); } @@ -87,8 +87,8 @@ void CCState::AnalyzeReturn(const SmallVectorImpl<ISD::OutputArg> &Outs, ISD::ArgFlagsTy ArgFlags = Outs[i].Flags; if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)) { #ifndef NDEBUG - cerr << "Return operand #" << i << " has unhandled type " - << VT.getEVTString(); + errs() << "Return operand #" << i << " has unhandled type " + << VT.getEVTString(); #endif llvm_unreachable(0); } @@ -106,8 +106,8 @@ void CCState::AnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs, ISD::ArgFlagsTy ArgFlags = Outs[i].Flags; if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { #ifndef NDEBUG - cerr << "Call operand #" << i << " has unhandled type " - << ArgVT.getEVTString(); + errs() << "Call operand #" << i << " has unhandled type " + << ArgVT.getEVTString(); #endif llvm_unreachable(0); } @@ -125,8 +125,8 @@ void CCState::AnalyzeCallOperands(SmallVectorImpl<EVT> &ArgVTs, ISD::ArgFlagsTy ArgFlags = Flags[i]; if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) { #ifndef NDEBUG - cerr << "Call operand #" << i << " has unhandled type " - << ArgVT.getEVTString(); + errs() << "Call operand #" << i << " has unhandled type " + << ArgVT.getEVTString(); #endif llvm_unreachable(0); } @@ -142,8 +142,8 @@ void CCState::AnalyzeCallResult(const SmallVectorImpl<ISD::InputArg> &Ins, ISD::ArgFlagsTy Flags = Ins[i].Flags; if (Fn(i, VT, VT, CCValAssign::Full, Flags, *this)) { #ifndef NDEBUG - cerr << "Call result #" << i << " has unhandled type " - << VT.getEVTString(); + errs() << "Call result #" << i << " has unhandled type " + << VT.getEVTString(); #endif llvm_unreachable(0); } @@ -155,8 +155,8 @@ void CCState::AnalyzeCallResult(const SmallVectorImpl<ISD::InputArg> &Ins, void CCState::AnalyzeCallResult(EVT VT, CCAssignFn Fn) { if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) { #ifndef NDEBUG - cerr << "Call result has unhandled type " - << VT.getEVTString(); + errs() << "Call result has unhandled type " + << VT.getEVTString(); #endif llvm_unreachable(0); } diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 9341212495..10f7b3206b 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -35,6 +35,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -950,7 +951,9 @@ SDValue SelectionDAGLegalize::LegalizeOp(SDValue Op) { switch (Node->getOpcode()) { default: #ifndef NDEBUG - cerr << "NODE: "; Node->dump(&DAG); cerr << "\n"; + errs() << "NODE: "; + Node->dump(&DAG); + errs() << "\n"; #endif llvm_unreachable("Do not know how to legalize this operator!"); diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index cc8d565768..ded913ba6e 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -659,7 +659,7 @@ bool SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) { if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Flag && !N->isMachineOpcode() && !doNotCSE(N)) { N->dump(this); - cerr << "\n"; + errs() << "\n"; llvm_unreachable("Node is not in map!"); } #endif @@ -5644,16 +5644,17 @@ static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) { if (N->getOperand(i).getNode()->hasOneUse()) DumpNodes(N->getOperand(i).getNode(), indent+2, G); else - cerr << "\n" << std::string(indent+2, ' ') - << (void*)N->getOperand(i).getNode() << ": <multiple use>"; + errs() << "\n" << std::string(indent+2, ' ') + << (void*)N->getOperand(i).getNode() << ": <multiple use>"; - cerr << "\n" << std::string(indent, ' '); + errs() << "\n"; + errs().indent(indent); N->dump(G); } void SelectionDAG::dump() const { - cerr << "SelectionDAG has " << AllNodes.size() << " nodes:"; + errs() << "SelectionDAG has " << AllNodes.size() << " nodes:"; for (allnodes_const_iterator I = allnodes_begin(), E = allnodes_end(); I != E; ++I) { @@ -5664,7 +5665,7 @@ void SelectionDAG::dump() const { if (getRoot().getNode()) DumpNodes(getRoot().getNode(), 2, this); - cerr << "\n\n"; + errs() << "\n\n"; } void SDNode::printr(raw_ostream &OS, const SelectionDAG *G) const { |