diff options
| author | Zachary Turner <zturner@google.com> | 2019-01-11 18:03:20 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2019-01-11 18:03:20 +0000 |
| commit | 863f8c18b9272021d9fa37b3f5ff83debb0002a3 (patch) | |
| tree | b3a7f25c3f8fd3f35bf1418638f53e91cc99fc02 /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h | |
| parent | 3a50a9fe74468ea376e59f81131a873fb1b4d7d7 (diff) | |
| download | bcm5719-llvm-863f8c18b9272021d9fa37b3f5ff83debb0002a3.tar.gz bcm5719-llvm-863f8c18b9272021d9fa37b3f5ff83debb0002a3.zip | |
[SymbolFile] Make ParseCompileUnitXXX accept a CompileUnit&.
Previously all of these functions accepted a SymbolContext&.
While a CompileUnit is one member of a SymbolContext, there
are also many others, and by passing such a monolithic parameter
in this way it makes the requirements and assumptions of the
API unclear for both callers as well as implementors.
All these methods need is a CompileUnit. By limiting the
parameter type in this way, we simplify the code as well as
make it self-documenting for both implementers and users.
Differential Revision: https://reviews.llvm.org/D56564
llvm-svn: 350943
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h index e9f98d55317..411f791cc97 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -107,23 +107,20 @@ public: lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override; lldb::LanguageType - ParseCompileUnitLanguage(const lldb_private::SymbolContext &sc) override; + ParseLanguage(lldb_private::CompileUnit &comp_unit) override; - size_t - ParseCompileUnitFunctions(const lldb_private::SymbolContext &sc) override; + size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override; - bool - ParseCompileUnitLineTable(const lldb_private::SymbolContext &sc) override; + bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override; - bool - ParseCompileUnitDebugMacros(const lldb_private::SymbolContext &sc) override; + bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override; - bool ParseCompileUnitSupportFiles( - const lldb_private::SymbolContext &sc, - lldb_private::FileSpecList &support_files) override; + bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, + lldb_private::FileSpecList &support_files) override; - bool - ParseCompileUnitIsOptimized(const lldb_private::SymbolContext &sc) override; + bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override; + + size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override; bool ParseImportedModules( const lldb_private::SymbolContext &sc, @@ -132,9 +129,6 @@ public: size_t ParseFunctionBlocks(const lldb_private::SymbolContext &sc) override; size_t - ParseTypesForCompileUnit(lldb_private::CompileUnit &comp_unit) override; - - size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override; lldb_private::Type *ResolveTypeUID(lldb::user_id_t type_uid) override; @@ -362,9 +356,8 @@ protected: bool GetFunction(const DWARFDIE &die, lldb_private::SymbolContext &sc); - lldb_private::Function * - ParseCompileUnitFunction(const lldb_private::SymbolContext &sc, - const DWARFDIE &die); + lldb_private::Function *ParseFunction(lldb_private::CompileUnit &comp_unit, + const DWARFDIE &die); size_t ParseFunctionBlocks(const lldb_private::SymbolContext &sc, lldb_private::Block *parent_block, |

