[Lldb-commits] [lldb] aa3e99d - [lldb] [nfc] Separate DIERef vs. user_id_t: GetForwardDeclClangTypeToDie()
Jan Kratochvil via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 18 09:09:49 PST 2020
Author: Jan Kratochvil
Date: 2020-02-18T18:09:39+01:00
New Revision: aa3e99dc859febba398925afeefb118403e15ab9
URL: https://github.com/llvm/llvm-project/commit/aa3e99dc859febba398925afeefb118403e15ab9
DIFF: https://github.com/llvm/llvm-project/commit/aa3e99dc859febba398925afeefb118403e15ab9.diff
LOG: [lldb] [nfc] Separate DIERef vs. user_id_t: GetForwardDeclClangTypeToDie()
Reasons are the same as for D74637.
Differential Revision: https://reviews.llvm.org/D74690
Added:
Modified:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 02f481684cd7..0ea3adceaecc 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1720,9 +1720,9 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
// binaries.
dwarf->GetForwardDeclDieToClangType()[die.GetDIE()] =
clang_type.GetOpaqueQualType();
- dwarf->GetForwardDeclClangTypeToDie()
- [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
- die.GetID();
+ dwarf->GetForwardDeclClangTypeToDie().try_emplace(
+ ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType(),
+ *die.GetDIERef());
m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index d8165d718499..04be8f5e7349 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -322,8 +322,7 @@ class SymbolFileDWARF : public lldb_private::SymbolFile,
typedef llvm::DenseMap<const DWARFDebugInfoEntry *,
lldb::opaque_compiler_type_t>
DIEToClangType;
- typedef llvm::DenseMap<lldb::opaque_compiler_type_t, lldb::user_id_t>
- ClangTypeToDIE;
+ typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> ClangTypeToDIE;
DISALLOW_COPY_AND_ASSIGN(SymbolFileDWARF);
More information about the lldb-commits
mailing list