summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBCompileUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBCompileUnit.cpp')
-rw-r--r--lldb/source/API/SBCompileUnit.cpp42
1 files changed, 36 insertions, 6 deletions
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index f3a8417d720..9f7487746a8 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -10,10 +10,13 @@
#include "lldb/API/SBCompileUnit.h"
#include "lldb/API/SBLineEntry.h"
#include "lldb/API/SBStream.h"
+#include "lldb/Core/Log.h"
+#include "lldb/Core/Module.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/LineEntry.h"
#include "lldb/Symbol/LineTable.h"
-#include "lldb/Core/Log.h"
+#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/Type.h"
using namespace lldb;
using namespace lldb_private;
@@ -148,12 +151,39 @@ SBCompileUnit::GetNumSupportFiles () const
{
if (m_opaque_ptr)
{
- FileSpecList& support_files = m_opaque_ptr->GetSupportFiles ();
- return support_files.GetSize();
+ FileSpecList& support_files = m_opaque_ptr->GetSupportFiles ();
+ return support_files.GetSize();
}
return 0;
}
+
+
+lldb::SBTypeList
+SBCompileUnit::GetTypes (uint32_t type_mask)
+{
+ SBTypeList sb_type_list;
+
+ if (m_opaque_ptr)
+ {
+ ModuleSP module_sp (m_opaque_ptr->GetModule());
+ if (module_sp)
+ {
+ SymbolVendor* vendor = module_sp->GetSymbolVendor();
+ if (vendor)
+ {
+ TypeList type_list;
+ vendor->GetTypes (m_opaque_ptr, type_mask, type_list);
+ sb_type_list.m_opaque_ap->Append(type_list);
+ }
+ }
+ }
+ return sb_type_list;
+}
+
+
+
+
SBFileSpec
SBCompileUnit::GetSupportFileAtIndex (uint32_t idx) const
{
@@ -162,9 +192,9 @@ SBCompileUnit::GetSupportFileAtIndex (uint32_t idx) const
SBFileSpec sb_file_spec;
if (m_opaque_ptr)
{
- FileSpecList &support_files = m_opaque_ptr->GetSupportFiles ();
- FileSpec file_spec = support_files.GetFileSpecAtIndex(idx);
- sb_file_spec.SetFileSpec(file_spec);
+ FileSpecList &support_files = m_opaque_ptr->GetSupportFiles ();
+ FileSpec file_spec = support_files.GetFileSpecAtIndex(idx);
+ sb_file_spec.SetFileSpec(file_spec);
}
if (log)
OpenPOWER on IntegriCloud