diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-12-07 22:21:48 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-12-07 22:21:48 +0000 |
commit | f5da13367f88f06e3b585dc2263ab6e9ca6c4bf8 (patch) | |
tree | 3cf9a9612ba0a90fee9ec668819ae5a69a7bada1 | |
parent | 6e49d8b4bf7b5911dc953551672161b8f9a7418f (diff) |
What should be the last unnecessary <iostream>s in the library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32333 91177308-0d34-0410-b5e6-96231b3b80d8
52 files changed, 2591 insertions, 1767 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index b85cfa29c5..e57a768507 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -31,7 +31,6 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/MathExtras.h" #include <cctype> -#include <iostream> using namespace llvm; namespace { diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp index cf02b8b3e4..08864a7b6d 100644 --- a/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -27,7 +27,6 @@ #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Support/Debug.h" -#include <iostream> #include <vector> using namespace llvm; diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 09c8b1f5d0..027b193922 100644 --- a/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/lib/Target/ARM/ARMRegisterInfo.cpp @@ -24,7 +24,6 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/ADT/STLExtras.h" -#include <iostream> using namespace llvm; // hasFP - Return true if the specified function should have a dedicated frame diff --git a/lib/Target/Alpha/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AlphaAsmPrinter.cpp index f4540dbe8f..4b71ab5292 100644 --- a/lib/Target/Alpha/AlphaAsmPrinter.cpp +++ b/lib/Target/Alpha/AlphaAsmPrinter.cpp @@ -24,7 +24,6 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Mangler.h" #include "llvm/ADT/Statistic.h" -#include <iostream> using namespace llvm; namespace { @@ -105,7 +104,7 @@ void AlphaAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) { return; case MachineOperand::MO_Immediate: - std::cerr << "printOp() does not handle immediate values\n"; + cerr << "printOp() does not handle immediate values\n"; abort(); return; @@ -265,13 +264,13 @@ bool AlphaAsmPrinter::doFinalization(Module &M) { "\t.section .data", I); break; case GlobalValue::GhostLinkage: - std::cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n"; + cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n"; abort(); case GlobalValue::DLLImportLinkage: - std::cerr << "DLLImport linkage is not supported by this target!\n"; + cerr << "DLLImport linkage is not supported by this target!\n"; abort(); case GlobalValue::DLLExportLinkage: - std::cerr << "DLLExport linkage is not supported by this target!\n"; + cerr << "DLLExport linkage is not supported by this target!\n"; abort(); default: assert(0 && "Unknown linkage type!"); diff --git a/lib/Target/Alpha/AlphaCodeEmitter.cpp b/lib/Target/Alpha/AlphaCodeEmitter.cpp index 884215e793..6f5bc70f05 100644 --- a/lib/Target/Alpha/AlphaCodeEmitter.cpp +++ b/lib/Target/Alpha/AlphaCodeEmitter.cpp @@ -23,7 +23,6 @@ #include "llvm/Function.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" -#include <iostream> using namespace llvm; namespace { @@ -158,7 +157,7 @@ int AlphaCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) { rv = MO.getImmedValue(); } else if (MO.isGlobalAddress() || MO.isExternalSymbol() || MO.isConstantPoolIndex()) { - DEBUG(std::cerr << MO << " is a relocated op for " << MI << "\n";); + DOUT << MO << " is a relocated op for " << MI << "\n"; unsigned Reloc = 0; int Offset = 0; bool useGOT = false; @@ -214,7 +213,7 @@ int AlphaCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) { Alpha::reloc_bsr, MO.getMachineBasicBlock())); }else { - std::cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n"; + cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n"; abort(); } diff --git a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp index 521e661dc0..fc752aa31f 100644 --- a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp +++ b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp @@ -29,7 +29,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include <algorithm> -#include <iostream> #include <queue> #include <set> using namespace llvm; @@ -115,7 +114,7 @@ namespace { unsigned at = CountLeadingZeros_64(x); uint64_t complow = 1 << (63 - at); uint64_t comphigh = 1 << (64 - at); - //std::cerr << x << ":" << complow << ":" << comphigh << "\n"; + //cerr << x << ":" << complow << ":" << comphigh << "\n"; if (abs(complow - x) <= abs(comphigh - x)) return complow; else diff --git a/lib/Target/Alpha/AlphaISelLowering.cpp b/lib/Target/Alpha/AlphaISelLowering.cpp index 6d53a9e59c..3ea4e88ac4 100644 --- a/lib/Target/Alpha/AlphaISelLowering.cpp +++ b/lib/Target/Alpha/AlphaISelLowering.cpp @@ -22,8 +22,6 @@ #include "llvm/Function.h" #include "llvm/Module.h" #include "llvm/Support/CommandLine.h" -#include <iostream> - using namespace llvm; /// AddLiveIn - This helper function adds the specified physical register to the @@ -224,7 +222,7 @@ static SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG, if (ArgNo < 6) { switch (ObjectVT) { default: - std::cerr << "Unknown Type " << ObjectVT << "\n"; + cerr << "Unknown Type " << ObjectVT << "\n"; abort(); case MVT::f64: args_float[ArgNo] = AddLiveIn(MF, args_float[ArgNo], diff --git a/lib/Target/Alpha/AlphaInstrInfo.cpp b/lib/Target/Alpha/AlphaInstrInfo.cpp index 4ac352b674..71bf5b0e96 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.cpp +++ b/lib/Target/Alpha/AlphaInstrInfo.cpp @@ -15,7 +15,6 @@ #include "AlphaInstrInfo.h" #include "AlphaGenInstrInfo.inc" #include "llvm/CodeGen/MachineInstrBuilder.h" -#include <iostream> using namespace llvm; AlphaInstrInfo::AlphaInstrInfo() diff --git a/lib/Target/Alpha/AlphaJITInfo.cpp b/lib/Target/Alpha/AlphaJITInfo.cpp index 81f5e743aa..669a2d5602 100644 --- a/lib/Target/Alpha/AlphaJITInfo.cpp +++ b/lib/Target/Alpha/AlphaJITInfo.cpp @@ -18,7 +18,6 @@ #include "llvm/Config/alloca.h" #include "llvm/Support/Debug.h" #include <cstdlib> -#include <iostream> #include <map> using namespace llvm; @@ -58,12 +57,12 @@ static void EmitBranchToAt(void *At, void *To) { AtI[0] = BUILD_OR(0, 27, 27); - DEBUG(std::cerr << "Stub targeting " << To << "\n"); + DOUT << "Stub targeting " << To << "\n"; for (int x = 1; x <= 8; ++x) { AtI[2*x - 1] = BUILD_SLLi(27,27,8); unsigned d = (Fn >> (64 - 8 * x)) & 0x00FF; - // DEBUG(std::cerr << "outputing " << hex << d << dec << "\n"); + //DOUT << "outputing " << hex << d << dec << "\n"; AtI[2*x] = BUILD_ORi(27, 27, d); } AtI[17] = BUILD_JMP(31,27,0); //jump, preserving ra, and setting pv @@ -87,12 +86,12 @@ extern "C" { //rewrite the stub to an unconditional branch if (((unsigned*)CameFromStub)[18] == 0x00FFFFFF) { - DEBUG(std::cerr << "Came from a stub, rewriting\n"); + DOUT << "Came from a stub, rewriting\n"; EmitBranchToAt(CameFromStub, Target); } else { - DEBUG(std::cerr << "confused, didn't come from stub at " << CameFromStub - << " old jump vector " << oldpv - << " new jump vector " << Target << "\n"); + DOUT << "confused, didn't come from stub at " << CameFromStub + << " old jump vector " << oldpv + << " new jump vector " << Target << "\n"; } //Change pv to new Target @@ -185,7 +184,7 @@ extern "C" { ); #else void AlphaCompilationCallback() { - std::cerr << "Cannot call AlphaCompilationCallback() on a non-Alpha arch!\n"; + cerr << "Cannot call AlphaCompilationCallback() on a non-Alpha arch!\n"; abort(); } #endif @@ -199,7 +198,7 @@ void *AlphaJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { for (int x = 0; x < 19; ++ x) MCE.emitWordLE(0); EmitBranchToAt(Addr, Fn); - DEBUG(std::cerr << "Emitting Stub to " << Fn << " at [" << Addr << "]\n"); + DOUT << "Emitting Stub to " << Fn << " at [" << Addr << "]\n"; return MCE.finishFunctionStub(0); } @@ -250,30 +249,30 @@ void AlphaJITInfo::relocate(void *Function, MachineRelocation *MR, case Alpha::reloc_literal: //This is a LDQl idx = MR->getGOTIndex(); - DEBUG(std::cerr << "Literal relocation to slot " << idx); + DOUT << "Literal relocation to slot " << idx; idx = (idx - GOToffset) * 8; - DEBUG(std::cerr << " offset " << idx << "\n"); + DOUT << " offset " << idx << "\n"; break; case Alpha::reloc_gprellow: idx = (unsigned char*)MR->getResultPointer() - &GOTBase[GOToffset * 8]; idx = getLower16(idx); - DEBUG(std::cerr << "gprellow relocation offset " << idx << "\n"); - DEBUG(std::cerr << " Pointer is " << (void*)MR->getResultPointer() - << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n"); + DOUT << "gprellow relocation offset " << idx << "\n"; + DOUT << " Pointer is " << (void*)MR->getResultPointer() + << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n"; break; case Alpha::reloc_gprelhigh: idx = (unsigned char*)MR->getResultPointer() - &GOTBase[GOToffset * 8]; idx = getUpper16(idx); - DEBUG(std::cerr << "gprelhigh relocation offset " << idx << "\n"); - DEBUG(std::cerr << " Pointer is " << (void*)MR->getResultPointer() - << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n"); + DOUT << "gprelhigh relocation offset " << idx << "\n"; + DOUT << " Pointer is " << (void*)MR->getResultPointer() + << " GOT is " << (void*)&GOTBase[GOToffset * 8] << "\n"; break; case Alpha::reloc_gpdist: switch (*RelocPos >> 26) { case 0x09: //LDAH idx = &GOTBase[GOToffset * 8] - (unsigned char*)RelocPos; idx = getUpper16(idx); - DEBUG(std::cerr << "LDAH: " << idx << "\n"); + DOUT << "LDAH: " << idx << "\n"; //add the relocation to the map gpdistmap[std::make_pair(Function, MR->getConstantVal())] = RelocPos; break; @@ -283,7 +282,7 @@ void AlphaJITInfo::relocate(void *Function, MachineRelocation *MR, idx = &GOTBase[GOToffset * 8] - (unsigned char*)gpdistmap[std::make_pair(Function, MR->getConstantVal())]; idx = getLower16(idx); - DEBUG(std::cerr << "LDA: " << idx << "\n"); + DOUT << "LDA: " << idx << "\n"; break; default: assert(0 && "Cannot handle gpdist yet"); diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp index 02d15703b7..bafd3b3229 100644 --- a/lib/Target/Alpha/AlphaRegisterInfo.cpp +++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp @@ -30,7 +30,6 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/STLExtras.h" #include <cstdlib> -#include <iostream> using namespace llvm; //These describe LDAx @@ -63,8 +62,8 @@ AlphaRegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned SrcReg, int FrameIdx, const TargetRegisterClass *RC) const { - //std::cerr << "Trying to store " << getPrettyName(SrcReg) << " to " - //<< FrameIdx << "\n"; + //cerr << "Trying to store " << getPrettyName(SrcReg) << " to " + // << FrameIdx << "\n"; //BuildMI(MBB, MI, Alpha::WTF, 0).addReg(SrcReg); if (RC == Alpha::F4RCRegisterClass) BuildMI(MBB, MI, TII.get(Alpha::STS)) @@ -84,8 +83,8 @@ AlphaRegisterInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, int FrameIdx, const TargetRegisterClass *RC) const { - //std::cerr << "Trying to load " << getPrettyName(DestReg) << " to " - //<< FrameIdx << "\n"; + //cerr << "Trying to load " << getPrettyName(DestReg) << " to " + // << FrameIdx << "\n"; if (RC == Alpha::F4RCRegisterClass) BuildMI(MBB, MI, TII.get(Alpha::LDS), DestReg) .addFrameIndex(FrameIdx).addReg(Alpha::F31); @@ -139,7 +138,7 @@ void AlphaRegisterInfo::copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const { - // std::cerr << "copyRegToReg " << DestReg << " <- " << SrcReg << "\n"; + //cerr << "copyRegToReg " << DestReg << " <- " << SrcReg << "\n"; if (RC == Alpha::GPRCRegisterClass) { BuildMI(MBB, MI, TII.get(Alpha::BISr), DestReg).addReg(SrcReg).addReg(SrcReg); } else if (RC == Alpha::F4RCRegisterClass) { @@ -147,8 +146,8 @@ void AlphaRegisterInfo::copyRegToReg(MachineBasicBlock &MBB, } else if (RC == Alpha::F8RCRegisterClass) { BuildMI(MBB, MI, TII.get(Alpha::CPYST), DestReg).addReg(SrcReg).addReg(SrcReg); } else { - std::cerr << "Attempt to copy register that is not GPR or FPR"; - abort(); + cerr << "Attempt to copy register that is not GPR or FPR"; + abort(); } } @@ -255,16 +254,16 @@ AlphaRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const { // Now add the frame object offset to the offset from the virtual frame index. int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex); - DEBUG(std::cerr << "FI: " << FrameIndex << " Offset: " << Offset << "\n"); + DOUT << "FI: " << FrameIndex << " Offset: " << Offset << "\n"; Offset += MF.getFrameInfo()->getStackSize(); - DEBUG(std::cerr << "Corrected Offset " << Offset << - " for stack size: " << MF.getFrameInfo()->getStackSize() << "\n"); + DOUT << "Corrected Offset " << Offset + << " for stack size: " << MF.getFrameInfo()->getStackSize() << "\n"; if (Offset > IMM_HIGH || Offset < IMM_LOW) { - DEBUG(std::cerr << "Unconditionally using R28 for evil purposes Offset: " - << Offset << "\n"); + DOUT << "Unconditionally using R28 for evil purposes Offset: " + << Offset << "\n"; //so in this case, we need to use a temporary register, and move the //original inst off the SP/FP //fix up the old: @@ -309,8 +308,8 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const { // brackets around call sites. //If there is a frame pointer, then we don't do this NumBytes += MFI->getMaxCallFrameSize(); - DEBUG(std::cerr << "Added " << MFI->getMaxCallFrameSize() - << " to the stack due to calls\n"); + DOUT << "Added " << MFI->getMaxCallFrameSize() + << " to the stack due to calls\n"; } if (FP) @@ -336,7 +335,7 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const { BuildMI(MBB, MBBI, TII.get(Alpha::LDA), Alpha::R30).addImm(getLower16(NumBytes)) .addReg(Alpha::R30); } else { - std::cerr << "Too big a stack frame at " << NumBytes << "\n"; + cerr << "Too big a stack frame at " << NumBytes << "\n"; abort(); } @@ -386,7 +385,7 @@ void AlphaRegisterInfo::emitEpilogue(MachineFunction &MF, BuildMI(MBB, MBBI, TII.get(Alpha::LDA), Alpha::R30) .addImm(getLower16(NumBytes)).addReg(Alpha::R30); } else { - std::cerr << "Too big a stack frame at " << NumBytes << "\n"; + cerr << "Too big a stack frame at " << NumBytes << "\n"; abort(); } } diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index d8fe0e8350..7c0d433676 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -42,9 +42,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Config/config.h" #include <algorithm> -#include <iostream> #include <ios> -#include <sstream> using namespace llvm; namespace { @@ -229,7 +227,7 @@ namespace { void visitVAArgInst (VAArgInst &I); void visitInstruction(Instruction &I) { - std::cerr << "C Writer does not know about " << I; + cerr << "C Writer does not know about " << I; abort(); } @@ -375,7 +373,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty, case Type::FloatTyID: return Out << "float " << NameSoFar; case Type::DoubleTyID: return Out << "double " << NameSoFar; default : - std::cerr << "Unknown primitive type: " << *Ty << "\n"; + cerr << "Unknown primitive type: " << *Ty << "\n"; abort(); } @@ -726,8 +724,8 @@ void CWriter::printConstant(Constant *CPV) { } default: - std::cerr << "CWriter Error: Unhandled constant expression: " - << *CE << "\n"; + cerr << "CWriter Error: Unhandled constant expression: " + << *CE << "\n"; abort(); } } else if (isa<UndefValue>(CPV) && CPV->getType()->isFirstClassType()) { @@ -901,7 +899,7 @@ void CWriter::printConstant(Constant *CPV) { } // FALL THROUGH default: - std::cerr << "Unknown constant type: " << *CPV << "\n"; + cerr << "Unknown constant type: " << *CPV << "\n"; abort(); } } @@ -1973,7 +1971,7 @@ void CWriter::visitBinaryOperator(Instruction &I) { case Instruction::Shl : Out << " << "; break; case Instruction::LShr: case Instruction::AShr: Out << " >> "; break; - default: std::cerr << "Invalid operator type!" << I; abort(); + default: cerr << "Invalid operator type!" << I; abort(); } writeOperandWithCast(I.getOperand(1), I.getOpcode()); @@ -2099,9 +2097,9 @@ void CWriter::visitCallInst(CallInst &I) { Out << ", "; // Output the last argument to the enclosing function... if (I.getParent()->getParent()->arg_empty()) { - std::cerr << "The C backend does not currently support zero " - << "argument varargs functions, such as '" - << I.getParent()->getParent()->getName() << "'!\n"; + cerr << "The C backend does not currently support zero " + << "argument varargs functions, such as '" + << I.getParent()->getParent()->getName() << "'!\n"; abort(); } writeOperand(--I.getParent()->getParent()->arg_end()); diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index d8fe0e8350..7c0d433676 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -42,9 +42,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Config/config.h" #include <algorithm> -#include <iostream> #include <ios> -#include <sstream> using namespace llvm; namespace { @@ -229,7 +227,7 @@ namespace { void visitVAArgInst (VAArgInst &I); void visitInstruction(Instruction &I) { - std::cerr << "C Writer does not know about " << I; + cerr << "C Writer does not know about " << I; abort(); } @@ -375,7 +373,7 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty, case Type::FloatTyID: return Out << "float " << NameSoFar; case Type::DoubleTyID: return Out << "double " << NameSoFar; default : - std::cerr << "Unknown primitive type: " << *Ty << "\n"; + cerr << "Unknown primitive type: " << *Ty << "\n"; abort(); } @@ -726,8 +724,8 @@ void CWriter::printConstant(Constant *CPV) { } default: - std::cerr << "CWriter Error: Unhandled constant expression: " - << *CE << "\n"; + cerr << "CWriter Error: Unhandled constant expression: " + << *CE << "\n"; abort(); } } else if (isa<UndefValue>(CPV) && CPV->getType()->isFirstClassType()) { @@ -901,7 +899,7 @@ void CWriter::printConstant(Constant *CPV) { } // FALL THROUGH default: |