bool SBTypeSummary::operator != (lldb::SBTypeSummary &rhs) { if (IsValid() == false) return !rhs.IsValid(); return m_opaque_sp != rhs.m_opaque_sp; }
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(); }
bool SBTypeSummary::IsEqualTo (lldb::SBTypeSummary &rhs) { if (IsValid() == false) return !rhs.IsValid(); if (m_opaque_sp->GetKind() != rhs.m_opaque_sp->GetKind()) return false; switch (m_opaque_sp->GetKind()) { case TypeSummaryImpl::Kind::eCallback: return llvm::dyn_cast<CXXFunctionSummaryFormat>(m_opaque_sp.get()) == llvm::dyn_cast<CXXFunctionSummaryFormat>(rhs.m_opaque_sp.get()); case TypeSummaryImpl::Kind::eScript: if (IsFunctionCode() != rhs.IsFunctionCode()) return false; if (IsFunctionName() != rhs.IsFunctionName()) return false; return GetOptions() == rhs.GetOptions(); case TypeSummaryImpl::Kind::eSummaryString: if (IsSummaryString() != rhs.IsSummaryString()) return false; return GetOptions() == rhs.GetOptions(); } return false; }
bool SBTypeSummary::IsEqualTo(lldb::SBTypeSummary &rhs) { if (IsValid()) { // valid and invalid are different if (!rhs.IsValid()) return false; } else { // invalid and valid are different if (rhs.IsValid()) return false; else // both invalid are the same return true; } if (m_opaque_sp->GetKind() != rhs.m_opaque_sp->GetKind()) return false; switch (m_opaque_sp->GetKind()) { case TypeSummaryImpl::Kind::eCallback: return llvm::dyn_cast<CXXFunctionSummaryFormat>(m_opaque_sp.get()) == llvm::dyn_cast<CXXFunctionSummaryFormat>(rhs.m_opaque_sp.get()); case TypeSummaryImpl::Kind::eScript: if (IsFunctionCode() != rhs.IsFunctionCode()) return false; if (IsFunctionName() != rhs.IsFunctionName()) return false; return GetOptions() == rhs.GetOptions(); case TypeSummaryImpl::Kind::eSummaryString: if (IsSummaryString() != rhs.IsSummaryString()) return false; return GetOptions() == rhs.GetOptions(); case TypeSummaryImpl::Kind::eInternal: return (m_opaque_sp.get() == rhs.m_opaque_sp.get()); } return false; }
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(); }