1 //===-- ClangExpressionHelper.h ---------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ClangExpression_h_
11 #define liblldb_ClangExpression_h_
18 #include "lldb/Core/ClangForward.h"
19 #include "lldb/Expression/ExpressionTypeSystemHelper.h"
20 #include "lldb/lldb-forward.h"
21 #include "lldb/lldb-private.h"
23 namespace lldb_private {
25 class RecordingMemoryManager;
27 //----------------------------------------------------------------------
28 // ClangExpressionHelper
29 //----------------------------------------------------------------------
30 class ClangExpressionHelper : public ExpressionTypeSystemHelper {
32 static bool classof(const ExpressionTypeSystemHelper *ts) {
33 return ts->getKind() == eKindClangHelper;
36 ClangExpressionHelper()
37 : ExpressionTypeSystemHelper(
38 ExpressionTypeSystemHelper::LLVMCastKind::eKindClangHelper) {}
40 //------------------------------------------------------------------
42 //------------------------------------------------------------------
43 virtual ~ClangExpressionHelper() {}
45 //------------------------------------------------------------------
46 /// Return the object that the parser should use when resolving external
47 /// values. May be NULL if everything should be self-contained.
48 //------------------------------------------------------------------
49 virtual ClangExpressionDeclMap *DeclMap() = 0;
51 //------------------------------------------------------------------
52 /// Return the object that the parser should allow to access ASTs.
53 /// May be NULL if the ASTs do not need to be transformed.
55 /// @param[in] passthrough
56 /// The ASTConsumer that the returned transformer should send
57 /// the ASTs to after transformation.
58 //------------------------------------------------------------------
59 virtual clang::ASTConsumer *
60 ASTTransformer(clang::ASTConsumer *passthrough) = 0;
62 virtual void CommitPersistentDecls() {}
67 } // namespace lldb_private
69 #endif // liblldb_ClangExpression_h_