<rdar://problem/15960553>

Fix a bug where calling SBFrame::FindValue() would cause a copy of all variables in the block to be inserted in the frame's variable list, regardless of whether those same variables were there or not - which means one could end up with a frame with lots of duplicate copies of the same variables

llvm-svn: 201614
diff --git a/lldb/source/Symbol/VariableList.cpp b/lldb/source/Symbol/VariableList.cpp
index 3451166..15f2b29 100644
--- a/lldb/source/Symbol/VariableList.cpp
+++ b/lldb/source/Symbol/VariableList.cpp
@@ -115,6 +115,22 @@
     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 (const RegularExpression& regex, VariableList &var_list, size_t& total_matches)
 {