Remove `SymbolFileDWARF *` when there is already `DWARFUnit *`
In D61502#1503247 @clayborg suggested that SymbolFileDWARF *dwarf2Data is
really redundant in all the calls with also having DWARFUnit *cu. So remove it.
One `SymbolFileDWARF *` nullptr check
(DWARFDebugInfoEntry::GetDIENamesAndRanges) could be removed, other two nullptr
checks (DWARFDebugInfoEntry::GetName and DWARFDebugInfoEntry::AppendTypeName)
need to stay in place (now for `DWARFUnit *`).
Differential Revision: https://reviews.llvm.org/D62011
llvm-svn: 361277
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 66ad3ad..c713e24 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1485,15 +1485,15 @@
if (GetDebugMapSymfile())
return nullptr;
- const char *dwo_name = cu_die.GetAttributeValueAsString(
- this, &dwarf_cu, DW_AT_GNU_dwo_name, nullptr);
+ const char *dwo_name =
+ cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_GNU_dwo_name, nullptr);
if (!dwo_name)
return nullptr;
SymbolFileDWARFDwp *dwp_symfile = GetDwpSymbolFile();
if (dwp_symfile) {
- uint64_t dwo_id = cu_die.GetAttributeValueAsUnsigned(this, &dwarf_cu,
- DW_AT_GNU_dwo_id, 0);
+ uint64_t dwo_id =
+ cu_die.GetAttributeValueAsUnsigned(&dwarf_cu, DW_AT_GNU_dwo_id, 0);
std::unique_ptr<SymbolFileDWARFDwo> dwo_symfile =
dwp_symfile->GetSymbolFileForDwoId(&dwarf_cu, dwo_id);
if (dwo_symfile)
@@ -1503,8 +1503,8 @@
FileSpec dwo_file(dwo_name);
FileSystem::Instance().Resolve(dwo_file);
if (dwo_file.IsRelative()) {
- const char *comp_dir = cu_die.GetAttributeValueAsString(
- this, &dwarf_cu, DW_AT_comp_dir, nullptr);
+ const char *comp_dir =
+ cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_comp_dir, nullptr);
if (!comp_dir)
return nullptr;