1 //===-- ClangExpressionHelper.h ---------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_ClangExpression_h_
10 #define liblldb_ClangExpression_h_
17 #include "lldb/Core/ClangForward.h"
18 #include "lldb/Expression/ExpressionTypeSystemHelper.h"
19 #include "lldb/lldb-forward.h"
20 #include "lldb/lldb-private.h"
22 namespace lldb_private {
24 class RecordingMemoryManager;
26 // ClangExpressionHelper
27 class ClangExpressionHelper : public ExpressionTypeSystemHelper {
29 static bool classof(const ExpressionTypeSystemHelper *ts) {
30 return ts->getKind() == eKindClangHelper;
33 ClangExpressionHelper()
34 : ExpressionTypeSystemHelper(
35 ExpressionTypeSystemHelper::LLVMCastKind::eKindClangHelper) {}
38 virtual ~ClangExpressionHelper() {}
40 /// Return the object that the parser should use when resolving external
41 /// values. May be NULL if everything should be self-contained.
42 virtual ClangExpressionDeclMap *DeclMap() = 0;
44 /// Return the object that the parser should allow to access ASTs.
45 /// May be NULL if the ASTs do not need to be transformed.
47 /// \param[in] passthrough
48 /// The ASTConsumer that the returned transformer should send
49 /// the ASTs to after transformation.
50 virtual clang::ASTConsumer *
51 ASTTransformer(clang::ASTConsumer *passthrough) = 0;
53 virtual void CommitPersistentDecls() {}
58 } // namespace lldb_private
60 #endif // liblldb_ClangExpression_h_