summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBModule.cpp
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/SBModule.cpp
parentb1ce33379a847a0b5257a03560d96a4158f1edf8 (diff)
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/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 0285cf304d4d..19c3ee7fce53 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)
{