[Lldb-commits] [PATCH] D152476: [lldb] Remove lldb's DWARFAbbreviationDeclarationSet in favor of llvm's

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 9 08:57:23 PDT 2023


aprantl accepted this revision.
aprantl added a comment.

Nice!



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp:61
 void DWARFDebugAbbrev::GetUnsupportedForms(
     std::set<dw_form_t> &invalid_forms) const {
+  for (const auto &pair : m_abbrevCollMap) {
----------------
at some point we could modernize this into
```
llvm::DenseSet<dw_form_t> DWARFDebugAbbrev::GetUnsupportedForms()
```


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp:62
     std::set<dw_form_t> &invalid_forms) const {
-  for (const auto &pair : m_abbrevCollMap)
-    pair.second.GetUnsupportedForms(invalid_forms);
+  for (const auto &pair : m_abbrevCollMap) {
+    for (const auto &decl : pair.second) {
----------------
nit: LLVM coding style would probably elide the {}


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h:23
 
 typedef std::map<dw_offset_t, DWARFAbbreviationDeclarationSet>
     DWARFAbbreviationDeclarationCollMap;
----------------
for a later commit: this should probably be a DenseMap for better performance?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152476



More information about the lldb-commits mailing list