summaryrefslogtreecommitdiffstats
path: root/lib/AST/StmtDumper.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-09 10:54:31 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-09 10:54:31 +0000
commit9668033ee4c25efd019e6c7e6dd96aa2e6364a46 (patch)
treedd6b987cb4cf441ad1b86790b5fad368b192ad36 /lib/AST/StmtDumper.cpp
parentf315fd6ebb9dbc47619315284c9af1ce5ec5f834 (diff)
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(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtDumper.cpp')
-rw-r--r--lib/AST/StmtDumper.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp
index cfd659cecb..4b7c8f0b40 100644
--- a/lib/AST/StmtDumper.cpp
+++ b/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";
}