1 | //===-- ClangExpressionHelper.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 LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONHELPER_H |
10 | #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONHELPER_H |
11 | |
12 | #include <map> |
13 | #include <string> |
14 | #include <vector> |
15 | |
16 | #include "lldb/Expression/ExpressionTypeSystemHelper.h" |
17 | #include "lldb/lldb-forward.h" |
18 | #include "lldb/lldb-private.h" |
19 | |
20 | namespace clang { |
21 | class ASTConsumer; |
22 | } |
23 | |
24 | namespace lldb_private { |
25 | |
26 | class ClangExpressionDeclMap; |
27 | |
28 | // ClangExpressionHelper |
29 | class ClangExpressionHelper |
30 | : public llvm::RTTIExtends<ClangExpressionHelper, |
31 | ExpressionTypeSystemHelper> { |
32 | public: |
33 | // LLVM RTTI support |
34 | static char ID; |
35 | |
36 | /// Return the object that the parser should use when resolving external |
37 | /// values. May be NULL if everything should be self-contained. |
38 | virtual ClangExpressionDeclMap *DeclMap() = 0; |
39 | |
40 | /// Return the object that the parser should allow to access ASTs. |
41 | /// May be NULL if the ASTs do not need to be transformed. |
42 | /// |
43 | /// \param[in] passthrough |
44 | /// The ASTConsumer that the returned transformer should send |
45 | /// the ASTs to after transformation. |
46 | virtual clang::ASTConsumer * |
47 | ASTTransformer(clang::ASTConsumer *passthrough) = 0; |
48 | |
49 | virtual void CommitPersistentDecls() {} |
50 | }; |
51 | |
52 | } // namespace lldb_private |
53 | |
54 | #endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONHELPER_H |
55 | |