aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclBase.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-30 00:08:05 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-30 00:08:05 +0000
commit4fe0c8e9c76b96e7aff21696a40dacc09d0237bc (patch)
tree1b4253035fcbb699c4110f220609fc7f37e64ca0 /include/clang/AST/DeclBase.h
parent9e8a72291465488e734c8aa5e20142d8b3cd981c (diff)
Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the information available in the AST. The functionality is still available via -ast-print, -ast-dump, etc., and also via the new member functions Decl::dump() and Decl::print(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r--include/clang/AST/DeclBase.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 271e59aadc..c25f467715 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -310,6 +310,12 @@ public:
/// Destroy - Call destructors and release memory.
virtual void Destroy(ASTContext& C);
+ void print(llvm::raw_ostream &Out, ASTContext &Context,
+ unsigned Indentation = 0);
+ void print(llvm::raw_ostream &Out, ASTContext &Context,
+ const PrintingPolicy &Policy, unsigned Indentation = 0);
+ void dump(ASTContext &Context);
+
private:
const Attr *getAttrsImpl() const;