summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-10-29 18:58:13 +0000
committerEnrico Granata <egranata@apple.com>2015-10-29 18:58:13 +0000
commit204aa1d9806425e4a6debdd75390acea1a655e77 (patch)
treee475573335a1111ccce8c088e2c1e3813f2d4dd1 /lldb/source/API
parentdeadf2a40a1fe77ec39e3e3d7833116184e49fa0 (diff)
downloadbcm5719-llvm-204aa1d9806425e4a6debdd75390acea1a655e77.tar.gz
bcm5719-llvm-204aa1d9806425e4a6debdd75390acea1a655e77.zip
Add an 'internal' kind of summary to support one-off subclasses of TypeSummaryImpl
llvm-svn: 251642
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBTypeSummary.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/lldb/source/API/SBTypeSummary.cpp b/lldb/source/API/SBTypeSummary.cpp
index 7c06bdafbf8..2985b765954 100644
--- a/lldb/source/API/SBTypeSummary.cpp
+++ b/lldb/source/API/SBTypeSummary.cpp
@@ -328,8 +328,21 @@ SBTypeSummary::operator == (lldb::SBTypeSummary &rhs)
bool
SBTypeSummary::IsEqualTo (lldb::SBTypeSummary &rhs)
{
- if (IsValid() == false)
- return !rhs.IsValid();
+ 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;
@@ -348,6 +361,8 @@ SBTypeSummary::IsEqualTo (lldb::SBTypeSummary &rhs)
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;
OpenPOWER on IntegriCloud