summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2015-03-22 13:35:56 +0000
committerFaisal Vali <faisalv@yahoo.com>2015-03-22 13:35:56 +0000
commit2da8ed92416cbd5dc3f9b55738660b17d5872981 (patch)
tree334944631e0a88af1a2734490d9751cf81f18b92 /clang/lib
parentbbb4cec2e87164c355b5b8509315530ab6a402fd (diff)
downloadbcm5719-llvm-2da8ed92416cbd5dc3f9b55738660b17d5872981.tar.gz
bcm5719-llvm-2da8ed92416cbd5dc3f9b55738660b17d5872981.zip
Add a dump function to Stmt that takes only an output stream. No functionality change.
This allows dumping to any given output stream but without requiring a SourceManager, similar to the interface provided by Decl. It's useful when writing certain generic debug functions, external to the clang code base (for e.g.). llvm-svn: 232912
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTDumper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index a5ad6db3797..711c3292760 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -2294,6 +2294,11 @@ LLVM_DUMP_METHOD void Stmt::dump(raw_ostream &OS, SourceManager &SM) const {
P.dumpStmt(this);
}
+LLVM_DUMP_METHOD void Stmt::dump(raw_ostream &OS) const {
+ ASTDumper P(OS, nullptr, nullptr);
+ P.dumpStmt(this);
+}
+
LLVM_DUMP_METHOD void Stmt::dump() const {
ASTDumper P(llvm::errs(), nullptr, nullptr);
P.dumpStmt(this);
OpenPOWER on IntegriCloud