<rdar://problem/13021266>

Adding FindFirstGlobalVariable to SBModule and SBTarget
These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172636 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index f0c916e..219870c 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -480,6 +480,15 @@
     return sb_value_list;
 }
 
+lldb::SBValue
+SBModule::FindFirstGlobalVariable (lldb::SBTarget &target, const char *name)
+{
+    SBValueList sb_value_list(FindGlobalVariables(target, name, 1));
+    if (sb_value_list.IsValid() && sb_value_list.GetSize() > 0)
+        return sb_value_list.GetValueAtIndex(0);
+    return SBValue();
+}
+
 lldb::SBType
 SBModule::FindFirstType (const char *name_cstr)
 {