[Lldb-commits] [PATCH] D69714: [lldb] Provide a getter for m_materializer_up in LLVMUserExpression instead of relying on it being accessible.
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 4 00:14:19 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGae10661a8121: [lldb] Provide a getter for m_materializer_up in LLVMUserExpression instead of… (authored by teemperor).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69714/new/
https://reviews.llvm.org/D69714
Files:
lldb/include/lldb/Expression/Expression.h
lldb/include/lldb/Expression/LLVMUserExpression.h
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -576,7 +576,7 @@
auto on_exit = llvm::make_scope_exit([this]() { ResetDeclMap(); });
- if (!DeclMap()->WillParse(exe_ctx, m_materializer_up.get())) {
+ if (!DeclMap()->WillParse(exe_ctx, GetMaterializer())) {
diagnostic_manager.PutString(
eDiagnosticSeverityError,
"current process state is unsuitable for expression parsing");
@@ -764,7 +764,7 @@
auto on_exit = llvm::make_scope_exit([this]() { ResetDeclMap(); });
- if (!DeclMap()->WillParse(exe_ctx, m_materializer_up.get())) {
+ if (!DeclMap()->WillParse(exe_ctx, GetMaterializer())) {
diagnostic_manager.PutString(
eDiagnosticSeverityError,
"current process state is unsuitable for expression parsing");
Index: lldb/include/lldb/Expression/LLVMUserExpression.h
===================================================================
--- lldb/include/lldb/Expression/LLVMUserExpression.h
+++ lldb/include/lldb/Expression/LLVMUserExpression.h
@@ -63,6 +63,8 @@
bool CanInterpret() override { return m_can_interpret; }
+ Materializer *GetMaterializer() override { return m_materializer_up.get(); }
+
/// Return the string that the parser should parse. Must be a full
/// translation unit.
const char *Text() override { return m_transformed_text.c_str(); }
Index: lldb/include/lldb/Expression/Expression.h
===================================================================
--- lldb/include/lldb/Expression/Expression.h
+++ lldb/include/lldb/Expression/Expression.h
@@ -64,6 +64,10 @@
/// default, return eLanguageTypeUnknown.
virtual lldb::LanguageType Language() { return lldb::eLanguageTypeUnknown; }
+ /// Return the Materializer that the parser should use when registering
+ /// external values.
+ virtual Materializer *GetMaterializer() { return nullptr; }
+
/// Return the desired result type of the function, or eResultTypeAny if
/// indifferent.
virtual ResultType DesiredResultType() { return eResultTypeAny; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69714.227652.patch
Type: text/x-patch
Size: 2257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191104/54ef3d43/attachment-0001.bin>
More information about the lldb-commits
mailing list