Example #1
0
bool
SBTypeSummary::IsEqualTo (lldb::SBTypeSummary &rhs)
{
    if (IsValid() == false)
        return !rhs.IsValid();

    if (m_opaque_sp->GetType() != rhs.m_opaque_sp->GetType())
        return false;
    
    if (m_opaque_sp->GetType() == lldb_private::TypeSummaryImpl::eTypeCallback)
    {
        lldb_private::CXXFunctionSummaryFormat *self_cxx = (lldb_private::CXXFunctionSummaryFormat*)m_opaque_sp.get();
        lldb_private::CXXFunctionSummaryFormat *other_cxx = (lldb_private::CXXFunctionSummaryFormat*)rhs.m_opaque_sp.get();
        return (self_cxx->m_impl == other_cxx->m_impl);
    }
    
    if (m_opaque_sp->IsScripted() != rhs.m_opaque_sp->IsScripted())
        return false;
    
    if (IsFunctionCode() != rhs.IsFunctionCode())
        return false;

    if (IsSummaryString() != rhs.IsSummaryString())
        return false;

    if (IsFunctionName() != rhs.IsFunctionName())
        return false;
    
    if ( GetData() == NULL || rhs.GetData() == NULL || strcmp(GetData(), rhs.GetData()) )
        return false;
    
    return GetOptions() == rhs.GetOptions();
    
}
Example #2
0
bool
SBTypeSummary::IsEqualTo (lldb::SBTypeSummary &rhs)
{
    if (IsValid() == false)
        return !rhs.IsValid();
    
    if (m_opaque_sp->IsScripted() != rhs.m_opaque_sp->IsScripted())
        return false;
    
    if (IsFunctionCode() != rhs.IsFunctionCode())
        return false;

    if (IsSummaryString() != rhs.IsSummaryString())
        return false;

    if (IsFunctionName() != rhs.IsFunctionName())
        return false;
    
    if ( strcmp(GetData(), rhs.GetData()) )
        return false;
    
    return GetOptions() == rhs.GetOptions();
    
}