Fixed value objects so that they return an

informative message when they have no description.

llvm-svn: 117190
This commit is contained in:
Sean Callanan 2010-10-23 00:18:49 +00:00
parent 92644efaf8
commit 672ad94681
1 changed files with 6 additions and 2 deletions

View File

@ -565,7 +565,11 @@ ValueObject::GetObjectDescription (ExecutionContextScope *exe_scope)
{
m_object_desc_str.append (s.GetData());
}
return m_object_desc_str.c_str();
if (m_object_desc_str.empty())
return NULL;
else
return m_object_desc_str.c_str();
}
const char *
@ -995,7 +999,7 @@ ValueObject::DumpValueObject
if (object_desc)
s.Printf(" %s\n", object_desc);
else
s.Printf ("No description available.\n");
s.Printf (" [no Objective-C description available]\n");
return;
}
}