summaryrefslogtreecommitdiff
path: root/source/Symbol/VariableList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Symbol/VariableList.cpp')
-rw-r--r--source/Symbol/VariableList.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/Symbol/VariableList.cpp b/source/Symbol/VariableList.cpp
index 3451166e52d42..75eb8700c9ff0 100644
--- a/source/Symbol/VariableList.cpp
+++ b/source/Symbol/VariableList.cpp
@@ -115,6 +115,32 @@ VariableList::FindVariable(const ConstString& name)
return var_sp;
}
+VariableSP
+VariableList::FindVariable (const ConstString& name, lldb::ValueType value_type)
+{
+ VariableSP var_sp;
+ iterator pos, end = m_variables.end();
+ for (pos = m_variables.begin(); pos != end; ++pos)
+ {
+ if ((*pos)->NameMatches(name) && (*pos)->GetScope() == value_type)
+ {
+ var_sp = (*pos);
+ break;
+ }
+ }
+ return var_sp;
+}
+
+size_t
+VariableList::AppendVariablesIfUnique(VariableList &var_list)
+{
+ const size_t initial_size = var_list.GetSize();
+ iterator pos, end = m_variables.end();
+ for (pos = m_variables.begin(); pos != end; ++pos)
+ var_list.AddVariableIfUnique(*pos);
+ return var_list.GetSize() - initial_size;
+}
+
size_t
VariableList::AppendVariablesIfUnique (const RegularExpression& regex, VariableList &var_list, size_t& total_matches)
{