]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / source / Plugins / ExpressionParser / Clang / ASTDumper.h
1 //===-- ASTDumper.h ---------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef liblldb_ASTDumper_h_
10 #define liblldb_ASTDumper_h_
11
12 #include "clang/AST/DeclVisitor.h"
13 #include "clang/AST/TypeVisitor.h"
14
15 #include "lldb/Utility/Stream.h"
16 #include "llvm/ADT/DenseSet.h"
17
18 namespace lldb_private {
19
20 class ASTDumper {
21 public:
22   ASTDumper(clang::Decl *decl);
23   ASTDumper(clang::DeclContext *decl_ctx);
24   ASTDumper(const clang::Type *type);
25   ASTDumper(clang::QualType type);
26   ASTDumper(lldb::opaque_compiler_type_t type);
27   ASTDumper(const CompilerType &compiler_type);
28
29   const char *GetCString();
30   void ToSTDERR();
31   void ToLog(Log *log, const char *prefix);
32   void ToStream(lldb::StreamSP &stream);
33
34 private:
35   std::string m_dump;
36 };
37
38 } // namespace lldb_private
39
40 #endif