summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-01-23 21:38:34 +0000
committerGreg Clayton <gclayton@apple.com>2014-01-23 21:38:34 +0000
commit1f4db7da8fa4e3c8e0b7ac9807abc7905675c61f (patch)
treef653e8e793a10b715e4755ff491e2c434f553358 /lldb/source/API
parentb1ce33379a847a0b5257a03560d96a4158f1edf8 (diff)
downloadbcm5719-llvm-1f4db7da8fa4e3c8e0b7ac9807abc7905675c61f.tar.gz
bcm5719-llvm-1f4db7da8fa4e3c8e0b7ac9807abc7905675c61f.zip
Added the ability to get the type that a typedef points to via:
SBType SBType::GetTypedefedType(); Also added the ability to get a type by type ID from a SBModule: SBType SBModule::GetTypeByID (lldb::user_id_t uid); llvm-svn: 199939
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBModule.cpp17
-rw-r--r--lldb/source/API/SBType.cpp8
2 files changed, 25 insertions, 0 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 0285cf304d4..19c3ee7fce5 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -579,6 +579,23 @@ SBModule::FindTypes (const char *type)
return retval;
}
+lldb::SBType
+SBModule::GetTypeByID (lldb::user_id_t uid)
+{
+ ModuleSP module_sp (GetSP ());
+ if (module_sp)
+ {
+ SymbolVendor* vendor = module_sp->GetSymbolVendor();
+ if (vendor)
+ {
+ Type *type_ptr = vendor->ResolveTypeUID(uid);
+ if (type_ptr)
+ return SBType(type_ptr->shared_from_this());
+ }
+ }
+ return SBType();
+}
+
lldb::SBTypeList
SBModule::GetTypes (uint32_t type_mask)
{
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index 3055c275208..5ca7ddf3d81 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -186,6 +186,14 @@ SBType::GetReferenceType()
}
SBType
+SBType::GetTypedefedType()
+{
+ if (!IsValid())
+ return SBType();
+ return SBType(TypeImplSP(new TypeImpl(m_opaque_sp->GetTypedefedType())));
+}
+
+SBType
SBType::GetDereferencedType()
{
if (!IsValid())
OpenPOWER on IntegriCloud