aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2012-07-26 16:01:23 +0000
committerAlexander Kornienko <alexfh@google.com>2012-07-26 16:01:23 +0000
commite34a052d642ba7830174b1a51787251d7f704f80 (patch)
tree71c76fe49f288ddb5986ad1d8c3abe33a92e3f03 /lib/AST/DeclPrinter.cpp
parentbae11d8f82378f3b5ffcc994d8b107c9fbec6c4e (diff)
Added -ast-dump-filter option to clang -cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r--lib/AST/DeclPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index 10f38942a5..fe8f8298be 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/lib/AST/DeclPrinter.cpp
@@ -173,8 +173,10 @@ void DeclContext::dumpDeclContext() const {
Printer.VisitDeclContext(const_cast<DeclContext *>(this), /*Indent=*/false);
}
-void Decl::dump() const {
- print(llvm::errs());
+void Decl::dump(raw_ostream &Out) const {
+ PrintingPolicy Policy = getASTContext().getPrintingPolicy();
+ Policy.Dump = true;
+ print(Out, Policy, /*Indentation*/ 0, /*PrintInstantiation*/ true);
}
raw_ostream& DeclPrinter::Indent(unsigned Indentation) {