Tightened up the variable list to deal with

variables that might not have valid names.

llvm-svn: 146133
This commit is contained in:
Sean Callanan 2011-12-08 02:51:25 +00:00
parent a8ad183a4c
commit 56d6fdf695
1 changed files with 2 additions and 0 deletions

View File

@ -315,6 +315,8 @@ public:
{
var_sp = GetVariableAtIndex(index);
const char *var_name_cstr = var_sp->GetName().GetCString();
if (!var_name_cstr || !name)
continue;
if (::strcmp (var_name_cstr, name) == 0)
return var_sp;
}