From 46f87dcad48b1eee897a3da0c8c1acb62b464880 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 26 Sep 2009 21:58:53 +0000 Subject: Make Decl::dump const. llvm-svn: 82878 --- clang/lib/AST/DeclPrinter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/AST/DeclPrinter.cpp') diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index f448144d282..9d0d836cf62 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -77,14 +77,14 @@ namespace { }; } -void Decl::print(llvm::raw_ostream &Out, unsigned Indentation) { +void Decl::print(llvm::raw_ostream &Out, unsigned Indentation) const { print(Out, getASTContext().PrintingPolicy, Indentation); } void Decl::print(llvm::raw_ostream &Out, const PrintingPolicy &Policy, - unsigned Indentation) { + unsigned Indentation) const { DeclPrinter Printer(Out, getASTContext(), Policy, Indentation); - Printer.Visit(this); + Printer.Visit(const_cast(this)); } static QualType GetBaseType(QualType T) { @@ -149,7 +149,7 @@ void Decl::printGroup(Decl** Begin, unsigned NumDecls, } } -void Decl::dump() { +void Decl::dump() const { print(llvm::errs()); } -- cgit v1.2.3