summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangPersistentVariables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ClangPersistentVariables.cpp')
-rw-r--r--lldb/source/Expression/ClangPersistentVariables.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangPersistentVariables.cpp b/lldb/source/Expression/ClangPersistentVariables.cpp
index 3da9dc8c365..db062d2e20b 100644
--- a/lldb/source/Expression/ClangPersistentVariables.cpp
+++ b/lldb/source/Expression/ClangPersistentVariables.cpp
@@ -46,6 +46,20 @@ ClangPersistentVariables::CreatePersistentVariable (ExecutionContextScope *exe_s
return var_sp;
}
+void
+ClangPersistentVariables::RemovePersistentVariable (lldb::ClangExpressionVariableSP variable)
+{
+ RemoveVariable(variable);
+
+ const char *name = variable->GetName().AsCString();
+
+ if (*name != '$')
+ return;
+ name++;
+
+ if (strtoul(name, NULL, 0) == m_next_persistent_variable_id - 1)
+ m_next_persistent_variable_id--;
+}
ConstString
ClangPersistentVariables::GetNextPersistentVariableName ()
OpenPOWER on IntegriCloud