summaryrefslogtreecommitdiff
path: root/include/lldb/Expression/LLVMUserExpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Expression/LLVMUserExpression.h')
-rw-r--r--include/lldb/Expression/LLVMUserExpression.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/include/lldb/Expression/LLVMUserExpression.h b/include/lldb/Expression/LLVMUserExpression.h
index 1ba822265fca..c2af7239951b 100644
--- a/include/lldb/Expression/LLVMUserExpression.h
+++ b/include/lldb/Expression/LLVMUserExpression.h
@@ -1,9 +1,8 @@
//===-- LLVMUserExpression.h ------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -20,8 +19,7 @@
namespace lldb_private {
-//----------------------------------------------------------------------
-/// @class LLVMUserExpression LLVMUserExpression.h
+/// \class LLVMUserExpression LLVMUserExpression.h
/// "lldb/Expression/LLVMUserExpression.h" Encapsulates a one-time expression
/// for use in lldb.
///
@@ -31,9 +29,13 @@ namespace lldb_private {
/// expression. The actual parsing part will be provided by the specific
/// implementations of LLVMUserExpression - which will be vended through the
/// appropriate TypeSystem.
-//----------------------------------------------------------------------
class LLVMUserExpression : public UserExpression {
public:
+ /// LLVM-style RTTI support.
+ static bool classof(const Expression *E) {
+ return E->getKind() == eKindLLVMUserExpression;
+ }
+
// The IRPasses struct is filled in by a runtime after an expression is
// compiled and can be used to to run fixups/analysis passes as required.
// EarlyPasses are run on the generated module before lldb runs its own IR
@@ -49,7 +51,8 @@ public:
LLVMUserExpression(ExecutionContextScope &exe_scope, llvm::StringRef expr,
llvm::StringRef prefix, lldb::LanguageType language,
ResultType desired_type,
- const EvaluateExpressionOptions &options);
+ const EvaluateExpressionOptions &options,
+ ExpressionKind kind);
~LLVMUserExpression() override;
bool FinalizeJITExecution(
@@ -60,10 +63,8 @@ public:
bool CanInterpret() override { return m_can_interpret; }
- //------------------------------------------------------------------
/// Return the string that the parser should parse. Must be a full
/// translation unit.
- //------------------------------------------------------------------
const char *Text() override { return m_transformed_text.c_str(); }
lldb::ModuleSP GetJITModule() override;
@@ -98,9 +99,9 @@ protected:
std::shared_ptr<IRExecutionUnit>
m_execution_unit_sp; ///< The execution unit the expression is stored in.
- std::unique_ptr<Materializer> m_materializer_ap; ///< The materializer to use
- ///when running the
- ///expression.
+ std::unique_ptr<Materializer> m_materializer_up; ///< The materializer to use
+ /// when running the
+ /// expression.
lldb::ModuleWP m_jit_module_wp;
bool m_enforce_valid_object; ///< True if the expression parser should enforce
///the presence of a valid class pointer