diff options
author | Alexander Kornienko <alexfh@google.com> | 2012-07-26 16:01:23 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2012-07-26 16:01:23 +0000 |
commit | 3db68ee109bc1d2749a03f2fb89b3e403c70f24e (patch) | |
tree | 194c6f8f3dc655171a11ee3d375d4bf994595165 /clang/lib/AST/DeclPrinter.cpp | |
parent | 3c80d5aa1515cd39416b60fbed8827e0d4f12deb (diff) | |
download | bcm5719-llvm-3db68ee109bc1d2749a03f2fb89b3e403c70f24e.tar.gz bcm5719-llvm-3db68ee109bc1d2749a03f2fb89b3e403c70f24e.zip |
Added -ast-dump-filter option to clang -cc1.
llvm-svn: 160784
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 10f38942a5e..fe8f8298bec 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/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) { |