labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

In D74690#1879121 <https://reviews.llvm.org/D74690#1879121>, @jankratochvil 
wrote:

> Sorry for that `DenseMap::insert`, I see it is the same as `std::map`, I 
> should study `DenseMap` more.


Yep, it tried to be similar to std::map, but there are some (sometimes subtle) 
differences.



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:1724
           clang_type.GetOpaqueQualType();
-      dwarf->GetForwardDeclClangTypeToDie()
-          [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
-          die.GetID();
+      dwarf->GetForwardDeclClangTypeToDie().insert(std::make_pair(
+          ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType(),
----------------
Actually, `try_emplace` would be slightly better here. (Sorry for the 
back-and-forth :/).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74690/new/

https://reviews.llvm.org/D74690



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to