diff options
Diffstat (limited to 'lldb/source/API/SBValue.cpp')
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 96182e37428..58a718bdebc 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -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; } |

