SymbolVendor: Remove the type list member
Summary:
Similarly to the compile unit lists, the list of types can also be
managed by the symbol file itself.
Since the only purpose of this list seems to be to maintain an owning
reference to all the types a symbol file has created (items are only
ever added to the list, never retrieved), I remove the passthrough
functions in SymbolVendor and Module. I also tighten the interface of
the function (return a reference instead of a pointer, make it protected
instead of public).
Reviewers: clayborg, JDevlieghere, jingham
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D65135
llvm-svn: 366994
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 086d985..7e634e6 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -82,12 +82,6 @@
return best_symfile_up.release();
}
-TypeList *SymbolFile::GetTypeList() {
- if (m_obj_file)
- return m_obj_file->GetModule()->GetTypeList();
- return nullptr;
-}
-
TypeSystem *SymbolFile::GetTypeSystemForLanguage(lldb::LanguageType language) {
TypeSystem *type_system =
m_obj_file->GetModule()->GetTypeSystemForLanguage(language);
@@ -206,6 +200,10 @@
}
void SymbolFile::Dump(Stream &s) {
+ s.PutCString("Types:\n");
+ m_type_list.Dump(&s, /*show_context*/ false);
+ s.PutChar('\n');
+
s.PutCString("Compile units:\n");
if (m_compile_units) {
for (const CompUnitSP &cu_sp : *m_compile_units) {