LLDB  mainline
ClangExpressionHelper.h
Go to the documentation of this file.
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 
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 class RecordingMemoryManager;
28 
29 // ClangExpressionHelper
31 public:
32  static bool classof(const ExpressionTypeSystemHelper *ts) {
33  return ts->getKind() == eKindClangHelper;
34  }
35 
39 
40  /// Destructor
41  virtual ~ClangExpressionHelper() = default;
42 
43  /// Return the object that the parser should use when resolving external
44  /// values. May be NULL if everything should be self-contained.
45  virtual ClangExpressionDeclMap *DeclMap() = 0;
46 
47  /// Return the object that the parser should allow to access ASTs.
48  /// May be NULL if the ASTs do not need to be transformed.
49  ///
50  /// \param[in] passthrough
51  /// The ASTConsumer that the returned transformer should send
52  /// the ASTs to after transformation.
53  virtual clang::ASTConsumer *
54  ASTTransformer(clang::ASTConsumer *passthrough) = 0;
55 
56  virtual void CommitPersistentDecls() {}
57 
58 protected:
59 };
60 
61 } // namespace lldb_private
62 
63 #endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONHELPER_H
lldb_private::ClangExpressionHelper::classof
static bool classof(const ExpressionTypeSystemHelper *ts)
Definition: ClangExpressionHelper.h:32
ExpressionTypeSystemHelper.h
lldb_private::ClangExpressionHelper::CommitPersistentDecls
virtual void CommitPersistentDecls()
Definition: ClangExpressionHelper.h:56
lldb_private::ExpressionTypeSystemHelper
Definition: ExpressionTypeSystemHelper.h:26
lldb_private::ExpressionTypeSystemHelper::LLVMCastKind
LLVMCastKind
Definition: ExpressionTypeSystemHelper.h:28
lldb_private::ClangExpressionHelper::~ClangExpressionHelper
virtual ~ClangExpressionHelper()=default
Destructor.
lldb_private::ClangExpressionHelper::DeclMap
virtual ClangExpressionDeclMap * DeclMap()=0
Return the object that the parser should use when resolving external values.
lldb_private::ClangExpressionHelper::ClangExpressionHelper
ClangExpressionHelper()
Definition: ClangExpressionHelper.h:36
lldb-private.h
lldb_private::ClangExpressionHelper
Definition: ClangExpressionHelper.h:30
clang
Definition: ASTResultSynthesizer.h:15
lldb-forward.h
lldb_private::ExpressionTypeSystemHelper::getKind
LLVMCastKind getKind() const
Definition: ExpressionTypeSystemHelper.h:35
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ClangExpressionHelper::ASTTransformer
virtual clang::ASTConsumer * ASTTransformer(clang::ASTConsumer *passthrough)=0
Return the object that the parser should allow to access ASTs.
lldb_private::ExpressionTypeSystemHelper::eKindClangHelper
@ eKindClangHelper
Definition: ExpressionTypeSystemHelper.h:29
lldb_private::ClangExpressionDeclMap
Definition: ClangExpressionDeclMap.h:56