diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h @@ -79,11 +79,10 @@ DeclContextToFileDIERefMap; typedef llvm::DenseMap DIERefToModuleMap; - typedef llvm::DenseMap - DIEToDeclMap; + typedef llvm::DenseMap DIERefToDeclMap; lldb_private::TypeSystemClang &m_ast; - DIEToDeclMap m_die_to_decl; + DIERefToDeclMap m_dieref_to_decl; DIERefToDeclContextMap m_dieref_to_decl_ctx; DeclContextToFileDIERefMap m_decl_ctx_to_filedieref; DIERefToModuleMap m_dieref_to_module; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -3136,20 +3136,21 @@ return nullptr; } - DIEToDeclMap::iterator cache_pos = m_die_to_decl.find(die.GetDIE()); - if (cache_pos != m_die_to_decl.end()) + DIERef dieref = *die.GetDIERef(); + DIERefToDeclMap::iterator cache_pos = m_dieref_to_decl.find(dieref); + if (cache_pos != m_dieref_to_decl.end()) return cache_pos->second; if (DWARFDIE spec_die = die.GetReferencedDIE(DW_AT_specification)) { clang::Decl *decl = GetClangDeclForDIE(spec_die); - m_die_to_decl[die.GetDIE()] = decl; + m_dieref_to_decl[dieref] = decl; return decl; } if (DWARFDIE abstract_origin_die = die.GetReferencedDIE(DW_AT_abstract_origin)) { clang::Decl *decl = GetClangDeclForDIE(abstract_origin_die); - m_die_to_decl[die.GetDIE()] = decl; + m_dieref_to_decl[dieref] = decl; return decl; } @@ -3213,7 +3214,7 @@ break; } - m_die_to_decl[die.GetDIE()] = decl; + m_dieref_to_decl[dieref] = decl; return decl; }