Skip to content

[lldb][SymbolFileDWARF][NFC] Remove unnecessary calls to GetDWARFDeclContext #74523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3120,7 +3120,8 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die) {
template_params = dwarf_ast->GetDIEClassTemplateParams(die);
}

m_index->GetTypes(GetDWARFDeclContext(die), [&](DWARFDIE type_die) {
const DWARFDeclContext die_dwarf_decl_ctx = GetDWARFDeclContext(die);
m_index->GetTypes(die_dwarf_decl_ctx, [&](DWARFDIE type_die) {
// Make sure type_die's language matches the type system we are
// looking for. We don't want to find a "Foo" type from Java if we
// are looking for a "Foo" type for C, C++, ObjC, or ObjC++.
Expand Down Expand Up @@ -3184,7 +3185,7 @@ SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die) {
}

// Make sure the decl contexts match all the way up
if (GetDWARFDeclContext(die) != type_dwarf_decl_ctx)
if (die_dwarf_decl_ctx != type_dwarf_decl_ctx)
return true;

Type *resolved_type = ResolveType(type_die, false);
Expand Down