diff options
author | Pavel Labath <pavel@labath.sk> | 2019-07-23 09:24:02 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-07-23 09:24:02 +0000 |
commit | e0119909a652c4df5129f54dbfa02fbb3fce3fc7 (patch) | |
tree | f31c8a40f3a86ab0f4d3745136ca0a4b833df4bf /lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h | |
parent | fdedf240f8c9a64552329fb3d200165924013e90 (diff) | |
download | bcm5719-llvm-e0119909a652c4df5129f54dbfa02fbb3fce3fc7.tar.gz bcm5719-llvm-e0119909a652c4df5129f54dbfa02fbb3fce3fc7.zip |
SymbolVendor: Move compile unit handling into the SymbolFile class
Summary:
SymbolFile classes are responsible for creating CompileUnit instances
and they already need to have a notion of the id<->CompileUnit mapping
(because of APIs like ParseCompileUnitAtIndex). However, the
SymbolVendor has remained as the thing responsible for caching created
units (which the SymbolFiles were calling via convoluted constructs like
"m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(...)").
This patch moves the responsibility of caching the units into the
SymbolFile class. It does this by moving the implementation of
SymbolVendor::{GetNumCompileUnits,GetCompileUnitAtIndex} into the
equivalent SymbolFile functions. The SymbolVendor functions become just
a passthrough much like the rest of SymbolVendor.
The original implementations of SymbolFile::GetNumCompileUnits is moved
to "CalculateNumCompileUnits", and are made protected, as the "Get"
function is the external api of the class.
SymbolFile::ParseCompileUnitAtIndex is made protected for the same
reason.
This is the first step in removing the SymbolVendor indirection, as
proposed in
<http://lists.llvm.org/pipermail/lldb-dev/2019-June/015071.html>. After
removing all interesting logic from the SymbolVendor class, I'll proceed
with removing the indirection itself.
Reviewers: clayborg, jingham, JDevlieghere
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D65089
llvm-svn: 366791
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h index 8a0b7645fd0..68036360686 100644 --- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h +++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h @@ -46,10 +46,6 @@ public: // Compile Unit function calls - uint32_t GetNumCompileUnits() override; - - lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override; - lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override { return lldb::eLanguageTypeUnknown; } @@ -196,7 +192,9 @@ private: }; - SymbolVendor &GetSymbolVendor(); + uint32_t CalculateNumCompileUnits() override; + lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override; + lldb::addr_t GetBaseFileAddress(); void ParseFileRecords(); void ParseCUData(); |