diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-09 10:54:31 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-09 10:54:31 +0000 |
| commit | c049f7547bd57065349148affdff70dcf82e134a (patch) | |
| tree | fa41a368ca022b1821a23435c3c93d372c44e815 /clang/lib | |
| parent | 773894ccec93e54728b059e3121e42ff58f78deb (diff) | |
| download | bcm5719-llvm-c049f7547bd57065349148affdff70dcf82e134a.tar.gz bcm5719-llvm-c049f7547bd57065349148affdff70dcf82e134a.zip | |
Revert the dump functions to send output to llvm::errs(), matching the LLVM convention; suggestion by Daniel.
'-ast-print' / '-ast-dump' command line options still send output to llvm::outs().
llvm-svn: 110569
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/StmtDumper.cpp | 20 | ||||
| -rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 4 |
2 files changed, 14 insertions, 10 deletions
diff --git a/clang/lib/AST/StmtDumper.cpp b/clang/lib/AST/StmtDumper.cpp index cfd659cecbc..4b7c8f0b40f 100644 --- a/clang/lib/AST/StmtDumper.cpp +++ b/clang/lib/AST/StmtDumper.cpp @@ -633,30 +633,34 @@ void StmtDumper::VisitObjCSuperExpr(ObjCSuperExpr *Node) { /// specified node and a few nodes underneath it, but not the whole subtree. /// This is useful in a debugger. void Stmt::dump(SourceManager &SM) const { - StmtDumper P(&SM, llvm::outs(), 4); + dump(llvm::errs(), SM); +} + +void Stmt::dump(llvm::raw_ostream &OS, SourceManager &SM) const { + StmtDumper P(&SM, OS, 4); P.DumpSubTree(const_cast<Stmt*>(this)); - llvm::outs() << "\n"; + OS << "\n"; } /// dump - This does a local dump of the specified AST fragment. It dumps the /// specified node and a few nodes underneath it, but not the whole subtree. /// This is useful in a debugger. void Stmt::dump() const { - StmtDumper P(0, llvm::outs(), 4); + StmtDumper P(0, llvm::errs(), 4); P.DumpSubTree(const_cast<Stmt*>(this)); - llvm::outs() << "\n"; + llvm::errs() << "\n"; } /// dumpAll - This does a dump of the specified AST fragment and all subtrees. void Stmt::dumpAll(SourceManager &SM) const { - StmtDumper P(&SM, llvm::outs(), ~0U); + StmtDumper P(&SM, llvm::errs(), ~0U); P.DumpSubTree(const_cast<Stmt*>(this)); - llvm::outs() << "\n"; + llvm::errs() << "\n"; } /// dumpAll - This does a dump of the specified AST fragment and all subtrees. void Stmt::dumpAll() const { - StmtDumper P(0, llvm::outs(), ~0U); + StmtDumper P(0, llvm::errs(), ~0U); P.DumpSubTree(const_cast<Stmt*>(this)); - llvm::outs() << "\n"; + llvm::errs() << "\n"; } diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 293e24065ad..41b1415f717 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1354,7 +1354,7 @@ void StmtPrinter::VisitBlockDeclRefExpr(BlockDeclRefExpr *Node) { //===----------------------------------------------------------------------===// void Stmt::dumpPretty(ASTContext& Context) const { - printPretty(llvm::outs(), Context, 0, + printPretty(llvm::errs(), Context, 0, PrintingPolicy(Context.getLangOptions())); } @@ -1368,7 +1368,7 @@ void Stmt::printPretty(llvm::raw_ostream &OS, ASTContext& Context, } if (Policy.Dump && &Context) { - dump(Context.getSourceManager()); + dump(OS, Context.getSourceManager()); return; } |

