Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.227 -> 1.228 Module.cpp updated: 1.68 -> 1.69 Pass.cpp updated: 1.75 -> 1.76 PassManagerT.h updated: 1.70 -> 1.71 --- Log message: Removing even more <iostream> includes. --- Diffs of the changes: (+37 -41) AsmWriter.cpp | 5 ++--- Module.cpp | 3 +-- Pass.cpp | 43 +++++++++++++++++++++---------------------- PassManagerT.h | 27 +++++++++++++-------------- 4 files changed, 37 insertions(+), 41 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.227 llvm/lib/VMCore/AsmWriter.cpp:1.228 --- llvm/lib/VMCore/AsmWriter.cpp:1.227 Wed Dec 6 19:30:31 2006 +++ llvm/lib/VMCore/AsmWriter.cpp Thu Dec 7 14:04:42 2006 @@ -31,7 +31,6 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Support/Streams.h" #include <algorithm> -#include <iostream> using namespace llvm; namespace llvm { @@ -1328,11 +1327,11 @@ // Value::dump - allow easy printing of Values from the debugger. // Located here because so much of the needed functionality is here. -void Value::dump() const { print(std::cerr); cerr << '\n'; } +void Value::dump() const { print(*cerr.stream()); cerr << '\n'; } // Type::dump - allow easy printing of Values from the debugger. // Located here because so much of the needed functionality is here. -void Type::dump() const { print(std::cerr); cerr << '\n'; } +void Type::dump() const { print(*cerr.stream()); cerr << '\n'; } //===----------------------------------------------------------------------===// // SlotMachine Implementation Index: llvm/lib/VMCore/Module.cpp diff -u llvm/lib/VMCore/Module.cpp:1.68 llvm/lib/VMCore/Module.cpp:1.69 --- llvm/lib/VMCore/Module.cpp:1.68 Wed May 31 11:40:28 2006 +++ llvm/lib/VMCore/Module.cpp Thu Dec 7 14:04:42 2006 @@ -22,7 +22,6 @@ #include <algorithm> #include <cstdarg> #include <cstdlib> -#include <iostream> #include <map> using namespace llvm; @@ -83,7 +82,7 @@ // Module::dump() - Allow printing from debugger void Module::dump() const { - print(std::cerr); + print(*cerr.stream()); } /// Target endian information... Index: llvm/lib/VMCore/Pass.cpp diff -u llvm/lib/VMCore/Pass.cpp:1.75 llvm/lib/VMCore/Pass.cpp:1.76 --- llvm/lib/VMCore/Pass.cpp:1.75 Fri Dec 1 17:46:50 2006 +++ llvm/lib/VMCore/Pass.cpp Thu Dec 7 14:04:42 2006 @@ -20,7 +20,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/TypeInfo.h" -#include <iostream> #include <set> using namespace llvm; @@ -68,7 +67,7 @@ bool FunctionPassManager::run(Function &F) { std::string errstr; if (MP->materializeFunction(&F, &errstr)) { - std::cerr << "Error reading bytecode file: " << errstr << "\n"; + cerr << "Error reading bytecode file: " << errstr << "\n"; abort(); } return PM->runOnFunction(F); @@ -114,49 +113,49 @@ // Print out arguments for registered passes that are _optimizations_ if (const PassInfo *PI = P->getPassInfo()) if (!PI->isAnalysisGroup()) - std::cerr << " -" << PI->getPassArgument(); + cerr << " -" << PI->getPassArgument(); } } void PMDebug::PrintPassInformation(unsigned Depth, const char *Action, Pass *P, Module *M) { if (PassDebugging >= Executions) { - std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" - << P->getPassName(); - if (M) std::cerr << "' on Module '" << M->getModuleIdentifier() << "'\n"; - std::cerr << "'...\n"; + cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" + << P->getPassName(); + if (M) cerr << "' on Module '" << M->getModuleIdentifier() << "'\n"; + cerr << "'...\n"; } } void PMDebug::PrintPassInformation(unsigned Depth, const char *Action, Pass *P, Function *F) { if (PassDebugging >= Executions) { - std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" - << P->getPassName(); - if (F) std::cerr << "' on Function '" << F->getName(); - std::cerr << "'...\n"; + cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" + << P->getPassName(); + if (F) cerr << "' on Function '" << F->getName(); + cerr << "'...\n"; } } void PMDebug::PrintPassInformation(unsigned Depth, const char *Action, Pass *P, BasicBlock *BB) { if (PassDebugging >= Executions) { - std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" - << P->getPassName(); - if (BB) std::cerr << "' on BasicBlock '" << BB->getName(); - std::cerr << "'...\n"; + cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" + << P->getPassName(); + if (BB) cerr << "' on BasicBlock '" << BB->getName(); + cerr << "'...\n"; } } void PMDebug::PrintAnalysisSetInfo(unsigned Depth, const char *Msg, Pass *P, const std::vector<AnalysisID> &Set){ if (PassDebugging >= Details && !Set.empty()) { - std::cerr << (void*)P << std::string(Depth*2+3, ' ') << Msg << " Analyses:"; + cerr << (void*)P << std::string(Depth*2+3, ' ') << Msg << " Analyses:"; for (unsigned i = 0; i != Set.size(); ++i) { - if (i) std::cerr << ","; - std::cerr << " " << Set[i]->getPassName(); + if (i) cerr << ","; + cerr << " " << Set[i]->getPassName(); } - std::cerr << "\n"; + cerr << "\n"; } } @@ -174,7 +173,7 @@ // dumpPassStructure - Implement the -debug-passes=Structure option void Pass::dumpPassStructure(unsigned Offset) { - std::cerr << std::string(Offset*2, ' ') << getPassName() << "\n"; + cerr << std::string(Offset*2, ' ') << getPassName() << "\n"; } // getPassName - Use C++ RTTI to get a SOMEWHAT intelligible name for the pass. @@ -193,9 +192,9 @@ O << "Pass::print not implemented for pass: '" << getPassName() << "'!\n"; } -// dump - call print(std::cerr); +// dump - call print(cerr); void Pass::dump() const { - print(std::cerr, 0); + print(*cerr.stream(), 0); } //===----------------------------------------------------------------------===// Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.70 llvm/lib/VMCore/PassManagerT.h:1.71 --- llvm/lib/VMCore/PassManagerT.h:1.70 Mon Oct 30 13:25:54 2006 +++ llvm/lib/VMCore/PassManagerT.h Thu Dec 7 14:04:42 2006 @@ -27,7 +27,6 @@ #include "llvm/Support/LeakDetector.h" #include "llvm/Support/Timer.h" #include <algorithm> -#include <iostream> namespace llvm { @@ -62,9 +61,9 @@ static void PerformPassStartupStuff(Pass *P) { // If debugging is enabled, print out argument information... if (PassDebugging >= Arguments) { - std::cerr << "Pass Arguments: "; + cerr << "Pass Arguments: "; PrintArgumentInformation(P); - std::cerr << "\n"; + cerr << "\n"; // Print the pass execution structure if (PassDebugging >= Structure) @@ -289,8 +288,8 @@ for (unsigned i = 0, e = ImmutablePasses.size(); i != e; ++i) ImmutablePasses[i]->dumpPassStructure(0); - std::cerr << std::string(Offset*2, ' ') << this->getPMName() - << " Pass Manager\n"; + cerr << std::string(Offset*2, ' ') << this->getPMName() + << " Pass Manager\n"; for (typename std::vector<PassClass*>::iterator I = Passes.begin(), E = Passes.end(); I != E; ++I) { PassClass *P = *I; @@ -300,7 +299,7 @@ for (std::map<Pass*, Pass*>::iterator I = LastUseOf.begin(), E = LastUseOf.end(); I != E; ++I) { if (P == I->second) { - std::cerr << "--" << std::string(Offset*2, ' '); + cerr << "--" << std::string(Offset*2, ' '); I->first->dumpPassStructure(0); } } @@ -543,13 +542,13 @@ E = AU.getRequiredSet().end(); I != E; ++I) { Pass *Impl = getAnalysisOrNullUp(*I); if (Impl == 0) { - std::cerr << "Analysis '" << (*I)->getPassName() - << "' used but not available!"; + cerr << "Analysis '" << (*I)->getPassName() + << "' used but not available!"; assert(0 && "Analysis used but not available!"); } else if (PassDebugging == Details) { if ((*I)->getPassName() != std::string(Impl->getPassName())) - std::cerr << " Interface '" << (*I)->getPassName() - << "' implemented by '" << Impl->getPassName() << "'\n"; + cerr << " Interface '" << (*I)->getPassName() + << "' implemented by '" << Impl->getPassName() << "'\n"; } IP->AnalysisImpls.push_back(std::make_pair(*I, Impl)); } @@ -632,13 +631,13 @@ E = AnUsage.getRequiredSet().end(); I != E; ++I) { Pass *Impl = getAnalysisOrNullUp(*I); if (Impl == 0) { - std::cerr << "Analysis '" << (*I)->getPassName() - << "' used but not available!"; + cerr << "Analysis '" << (*I)->getPassName() + << "' used but not available!"; assert(0 && "Analysis used but not available!"); } else if (PassDebugging == Details) { if ((*I)->getPassName() != std::string(Impl->getPassName())) - std::cerr << " Interface '" << (*I)->getPassName() - << "' implemented by '" << Impl->getPassName() << "'\n"; + cerr << " Interface '" << (*I)->getPassName() + << "' implemented by '" << Impl->getPassName() << "'\n"; } P->AnalysisImpls.push_back(std::make_pair(*I, Impl)); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits