Now persistent expression data no longer lives with the Target, but rather with
the corresponding TypeSystem. This makes sense because what kind of data there
is -- and how it can be looked up -- depends on the language.
Functionality that is common to all type systems is factored out into
PersistentExpressionState.
llvm-svn: 248934
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 7f6cf3f..485e8ff 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -9158,7 +9158,8 @@
ClangASTContextForExpressions::ClangASTContextForExpressions (Target &target) :
ClangASTContext (target.GetArchitecture().GetTriple().getTriple().c_str()),
- m_target_wp(target.shared_from_this())
+ m_target_wp(target.shared_from_this()),
+ m_persistent_variables (new ClangPersistentVariables)
{
}
@@ -9196,9 +9197,15 @@
ClangASTContextForExpressions::GetUtilityFunction (const char *text,
const char *name)
{
- TargetSP target_sp = m_target_wp.lock();
+ TargetSP target_sp = m_target_wp.lock();
if (!target_sp)
return nullptr;
return new ClangUtilityFunction(*target_sp.get(), text, name);
}
+
+PersistentExpressionState *
+ClangASTContextForExpressions::GetPersistentExpressionState ()
+{
+ return m_persistent_variables.get();
+}