[Lldb-commits] [PATCH] D74690: Separate DIERef vs. user_id_t: GetForwardDeclClangTypeToDie()
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 17 07:50:57 PST 2020
jankratochvil updated this revision to Diff 244976.
jankratochvil added a comment.
Sorry for that `DenseMap::insert`, I see it is the same as `std::map`, I should study `DenseMap` more.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74690/new/
https://reviews.llvm.org/D74690
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -322,8 +322,7 @@
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);
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1721,9 +1721,9 @@
// binaries.
dwarf->GetForwardDeclDieToClangType()[die.GetDIE()] =
clang_type.GetOpaqueQualType();
- dwarf->GetForwardDeclClangTypeToDie()
- [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
- die.GetID();
+ dwarf->GetForwardDeclClangTypeToDie().insert(std::make_pair(
+ ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType(),
+ *die.GetDIERef()));
m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74690.244976.patch
Type: text/x-patch
Size: 1449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200217/9644112e/attachment-0001.bin>
More information about the lldb-commits
mailing list