Fixed casting in the lldb::SBValue::Cast(SBType) function.

llvm-svn: 149673
This commit is contained in:
Greg Clayton
2012-02-03 05:34:10 +00:00
parent ccb673659a
commit 9a142cf84d
6 changed files with 205 additions and 3 deletions

View File

@@ -378,8 +378,8 @@ lldb::SBValue
SBValue::Cast (SBType type)
{
lldb::SBValue sb_value;
if (m_opaque_sp)
sb_value = CreateChildAtOffset(m_opaque_sp->GetName().GetCString(), 0, type);
if (m_opaque_sp && type.IsValid())
*sb_value = m_opaque_sp->Cast(type.ref().GetClangASTType());
return sb_value;
}