summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-03-24 01:11:14 +0000
committerEnrico Granata <egranata@apple.com>2012-03-24 01:11:14 +0000
commit86027e954c76b4ed9b699f64c3c1cdd2ba47ad5a (patch)
tree3906f7681c06f6108e99a6ab250cdd24522474c6 /lldb/source/API
parent25553ab5fe1f5e802d0b08bd1d276b3ea94ceff2 (diff)
downloadbcm5719-llvm-86027e954c76b4ed9b699f64c3c1cdd2ba47ad5a.tar.gz
bcm5719-llvm-86027e954c76b4ed9b699f64c3c1cdd2ba47ad5a.zip
Adding a new API call IsTypeComplete() to SBType. This call is meant to check if the type has been previously completed or not (which is mostly interesting from a performance point of view)
Adding a test case that checks that we do not complete types before due time. This should help us track cases similar to the cascading data formatters. llvm-svn: 153363
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBType.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index 52f173f8300..f1d651faf3e 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -426,6 +426,15 @@ SBType::GetFieldAtIndex (uint32_t idx)
return sb_type_member;
}
+bool
+SBType::IsTypeComplete()
+{
+ if (!IsValid())
+ return false;
+
+ return ClangASTContext::IsCompleteType(m_opaque_sp->GetASTContext(), m_opaque_sp->GetOpaqueQualType());
+}
+
const char*
SBType::GetName()
{
OpenPOWER on IntegriCloud