diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-12-07 20:04:42 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-12-07 20:04:42 +0000 |
commit | 832171cb9724d2d31c8dfb73172e2be8f6dd13ee (patch) | |
tree | 19c97b01f69b4d0765e4ccdd1dac03c854d6e5eb /lib/VMCore | |
parent | 04b4e0595ffffab232a73a78d742e08efb6ebcfb (diff) | |
download | external_llvm-832171cb9724d2d31c8dfb73172e2be8f6dd13ee.zip external_llvm-832171cb9724d2d31c8dfb73172e2be8f6dd13ee.tar.gz external_llvm-832171cb9724d2d31c8dfb73172e2be8f6dd13ee.tar.bz2 |
Removing even more <iostream> includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 5 | ||||
-rw-r--r-- | lib/VMCore/Module.cpp | 3 | ||||
-rw-r--r-- | lib/VMCore/Pass.cpp | 43 | ||||
-rw-r--r-- | lib/VMCore/PassManagerT.h | 27 |
4 files changed, 37 insertions, 41 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 072fc51..a0d82bc 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -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 @@ void Argument::print(std::ostream &o) const { // 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 diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index 7dcd44c..8d924de 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -22,7 +22,6 @@ #include <algorithm> #include <cstdarg> #include <cstdlib> -#include <iostream> #include <map> using namespace llvm; @@ -83,7 +82,7 @@ Module::~Module() { // Module::dump() - Allow printing from debugger void Module::dump() const { - print(std::cerr); + print(*cerr.stream()); } /// Target endian information... diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index 44675be..c7a80c5 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -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::doInitialization() { 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 @@ void PMDebug::PrintArgumentInformation(const Pass *P) { // 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 @@ bool Pass::mustPreserveAnalysisID(const PassInfo *AnalysisID) const { // 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 @@ void Pass::print(std::ostream &O,const Module*) const { 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); } //===----------------------------------------------------------------------===// diff --git a/lib/VMCore/PassManagerT.h b/lib/VMCore/PassManagerT.h index c7cbb12..9753596 100644 --- a/lib/VMCore/PassManagerT.h +++ b/lib/VMCore/PassManagerT.h @@ -27,7 +27,6 @@ #include "llvm/Support/LeakDetector.h" #include "llvm/Support/Timer.h" #include <algorithm> -#include <iostream> namespace llvm { @@ -62,9 +61,9 @@ struct PMDebug { 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ private: 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)); |