[Lldb-commits] [lldb] 034c2c6 - [lldb/DWARF] Use DWARFDebugInfoEntry * in ElaboratingDIEIterator

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 12 03:49:50 PST 2020


Author: Pavel Labath
Date: 2020-02-12T12:48:49+01:00
New Revision: 034c2c6771d318f962bbf001f00ee11e542e1180

URL: https://github.com/llvm/llvm-project/commit/034c2c6771d318f962bbf001f00ee11e542e1180
DIFF: https://github.com/llvm/llvm-project/commit/034c2c6771d318f962bbf001f00ee11e542e1180.diff

LOG: [lldb/DWARF] Use DWARFDebugInfoEntry * in ElaboratingDIEIterator

This is simpler, faster, and sufficient to uniquely idenify a DIE.

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
index 5d8c522a4dcc..8e995e627978 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -32,7 +32,7 @@ class ElaboratingDIEIterator
   // Container sizes are optimized for the case of following DW_AT_specification
   // and DW_AT_abstract_origin just once.
   llvm::SmallVector<DWARFDIE, 2> m_worklist;
-  llvm::SmallSet<lldb::user_id_t, 3> m_seen;
+  llvm::SmallSet<DWARFDebugInfoEntry *, 3> m_seen;
 
   void Next() {
     assert(!m_worklist.empty() && "Incrementing end iterator?");
@@ -44,7 +44,7 @@ class ElaboratingDIEIterator
     // And add back any items that elaborate it.
     for (dw_attr_t attr : {DW_AT_specification, DW_AT_abstract_origin}) {
       if (DWARFDIE d = die.GetReferencedDIE(attr))
-        if (m_seen.insert(die.GetID()).second)
+        if (m_seen.insert(die.GetDIE()).second)
           m_worklist.push_back(d);
     }
   }


        


More information about the lldb-commits mailing list