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/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 9585b35..e7ff328 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -729,7 +729,7 @@
TypeSP type = CreateAndCacheType(type_id);
if (type)
- m_obj_file->GetModule()->GetTypeList()->Insert(type);
+ GetTypeList().Insert(type);
return type;
}
@@ -1283,7 +1283,7 @@
if (m_done_full_type_scan)
return 0;
- size_t old_count = m_obj_file->GetModule()->GetTypeList()->GetSize();
+ const size_t old_count = GetTypeList().GetSize();
LazyRandomTypeCollection &types = m_index->tpi().typeCollection();
// First process the entire TPI stream.
@@ -1313,7 +1313,7 @@
GetOrCreateTypedef(global);
}
- size_t new_count = m_obj_file->GetModule()->GetTypeList()->GetSize();
+ const size_t new_count = GetTypeList().GetSize();
m_done_full_type_scan = true;