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/VMCore | |
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/VMCore')
-rw-r--r-- | lib/VMCore/Dominators.cpp | 8 | ||||
-rw-r--r-- | lib/VMCore/Pass.cpp | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index e3bcbb7542..bb73aaf705 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -48,9 +48,8 @@ bool DominatorTree::runOnFunction(Function &F) { return false; } -void DominatorTree::print(std::ostream &OS, const Module *) const { - raw_os_ostream OSS(OS); - DT->print(OSS); +void DominatorTree::print(raw_ostream &OS, const Module *) const { + DT->print(OS); } @@ -264,8 +263,7 @@ DominanceFrontier::calculate(const DominatorTree &DT, return *Result; } -void DominanceFrontierBase::print(std::ostream &O, const Module* ) const { - raw_os_ostream OS(O); +void DominanceFrontierBase::print(raw_ostream &OS, const Module* ) const { for (const_iterator I = begin(), E = end(); I != E; ++I) { OS << " DomFrontier for BB"; if (I->first) diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index d82389d99d..e2a8d744e3 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -19,6 +19,7 @@ #include "llvm/ModuleProvider.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/System/Atomic.h" #include "llvm/System/Mutex.h" #include "llvm/System/Threading.h" @@ -45,7 +46,7 @@ bool Pass::mustPreserveAnalysisID(const PassInfo *AnalysisID) const { // dumpPassStructure - Implement the -debug-passes=Structure option void Pass::dumpPassStructure(unsigned Offset) { - cerr << std::string(Offset*2, ' ') << getPassName() << "\n"; + errs().indent(Offset*2) << getPassName() << "\n"; } /// getPassName - Return a nice clean name for a pass. This usually @@ -62,13 +63,13 @@ const char *Pass::getPassName() const { // to print out the contents of an analysis. Otherwise it is not necessary to // implement this method. // -void Pass::print(std::ostream &O,const Module*) const { +void Pass::print(raw_ostream &O,const Module*) const { O << "Pass::print not implemented for pass: '" << getPassName() << "'!\n"; } // dump - call print(cerr); void Pass::dump() const { - print(*cerr.stream(), 0); + print(errs(), 0); } //===----------------------------------------------------------------------===// |