summaryrefslogtreecommitdiff
path: root/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/ExpressionParser/Clang/ClangUserExpression.h')
-rw-r--r--source/Plugins/ExpressionParser/Clang/ClangUserExpression.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h b/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
index 88a78798b657..ac363bf91747 100644
--- a/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
+++ b/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
@@ -35,13 +35,13 @@ namespace lldb_private {
//----------------------------------------------------------------------
/// @class ClangUserExpression ClangUserExpression.h
-/// "lldb/Expression/ClangUserExpression.h"
-/// @brief Encapsulates a single expression for use with Clang
+/// "lldb/Expression/ClangUserExpression.h" Encapsulates a single expression
+/// for use with Clang
///
/// LLDB uses expressions for various purposes, notably to call functions
/// and as a backend for the expr command. ClangUserExpression encapsulates
-/// the objects needed to parse and interpret or JIT an expression. It
-/// uses the Clang parser to produce LLVM IR from the expression.
+/// the objects needed to parse and interpret or JIT an expression. It uses
+/// the Clang parser to produce LLVM IR from the expression.
//----------------------------------------------------------------------
class ClangUserExpression : public LLVMUserExpression {
public:
@@ -69,8 +69,8 @@ public:
bool keep_result_in_memory);
//------------------------------------------------------------------
- /// Return the object that the parser should allow to access ASTs.
- /// May be NULL if the ASTs do not need to be transformed.
+ /// Return the object that the parser should allow to access ASTs. May be
+ /// NULL if the ASTs do not need to be transformed.
///
/// @param[in] passthrough
/// The ASTConsumer that the returned transformer should send
@@ -174,11 +174,18 @@ private:
lldb::addr_t struct_address,
DiagnosticManager &diagnostic_manager) override;
+ llvm::Optional<lldb::LanguageType> GetLanguageForExpr(
+ DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx);
+ bool SetupPersistentState(DiagnosticManager &diagnostic_manager,
+ ExecutionContext &exe_ctx);
+ bool PrepareForParsing(DiagnosticManager &diagnostic_manager,
+ ExecutionContext &exe_ctx);
+
ClangUserExpressionHelper m_type_system_helper;
class ResultDelegate : public Materializer::PersistentVariableDelegate {
public:
- ResultDelegate();
+ ResultDelegate(lldb::TargetSP target) : m_target_sp(target) {}
ConstString GetName() override;
void DidDematerialize(lldb::ExpressionVariableSP &variable) override;
@@ -188,6 +195,7 @@ private:
private:
PersistentExpressionState *m_persistent_state;
lldb::ExpressionVariableSP m_variable;
+ lldb::TargetSP m_target_sp;
};
ResultDelegate m_result_delegate;