xref: /NextBSD/contrib/llvm/tools/lldb/include/lldb/Expression/ASTDumper.h (revision eb1a5f8de9f7ea602c373a710f531abbf81141c4)
1 //===-- ASTDumper.h ---------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_ASTDumper_h_
11 #define liblldb_ASTDumper_h_
12 
13 #include "clang/AST/DeclVisitor.h"
14 #include "clang/AST/StmtVisitor.h"
15 #include "clang/AST/TypeVisitor.h"
16 
17 #include "lldb/Core/Stream.h"
18 #include "llvm/ADT/DenseSet.h"
19 
20 namespace lldb_private
21 {
22 
23 class ASTDumper
24 {
25 public:
26     ASTDumper (clang::Decl *decl);
27     ASTDumper (clang::DeclContext *decl_ctx);
28     ASTDumper (const clang::Type *type);
29     ASTDumper (clang::QualType type);
30     ASTDumper (lldb::clang_type_t type);
31     ASTDumper (const ClangASTType &clang_type);
32 
33     const char *GetCString();
34     void ToSTDERR();
35     void ToLog(Log *log, const char *prefix);
36     void ToStream(lldb::StreamSP &stream);
37 private:
38     std::string m_dump;
39 };
40 
41 } // namespace lldb_private
42 
43 #endif
44