Replicated the materialization logic for persistent
variables in the Materializer. We don't use this
code yet, but will soon once the other materializers
are online.
llvm-svn: 179390
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index cc1c103..c1bef43 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -510,6 +510,11 @@
var_sp->m_flags |= ClangExpressionVariable::EVNeedsAllocation;
}
+ if (m_keep_result_in_memory)
+ {
+ var_sp->m_flags |= ClangExpressionVariable::EVKeepInTarget;
+ }
+
if (log)
log->Printf("Created persistent variable with flags 0x%hx", var_sp->m_flags);
@@ -523,7 +528,7 @@
if (m_parser_vars->m_materializer)
{
Error err;
- m_parser_vars->m_materializer->AddResultVariable(user_type, err);
+ m_parser_vars->m_materializer->AddResultVariable(user_type, m_keep_result_in_memory, err);
}
return true;