jankratochvil created this revision. jankratochvil added reviewers: labath, clayborg. jankratochvil added a project: LLDB. Herald added a subscriber: aprantl. Herald added a reviewer: jdoerfert.
As discussed <https://reviews.llvm.org/D73206#1871895> in D73206 <https://reviews.llvm.org/D73206> simplifying usage of `user_id_t`. There is even written: // The compile unit ID is the index of the DWARF unit. DWARFUnit *dwarf_cu = info->GetUnitAtIndex(comp_unit->GetID()); Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D74670 Files: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h @@ -35,7 +35,7 @@ lldb_private::DWARFContext &context); size_t GetNumUnits(); - DWARFUnit *GetUnitAtIndex(lldb::user_id_t idx); + DWARFUnit *GetUnitAtIndex(size_t idx); DWARFUnit *GetUnitAtOffset(DIERef::Section section, dw_offset_t cu_offset, uint32_t *idx_ptr = nullptr); DWARFUnit *GetUnitContainingDIEOffset(DIERef::Section section, Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -109,7 +109,7 @@ return m_units.size(); } -DWARFUnit *DWARFDebugInfo::GetUnitAtIndex(user_id_t idx) { +DWARFUnit *DWARFDebugInfo::GetUnitAtIndex(size_t idx) { DWARFUnit *cu = nullptr; if (idx < GetNumUnits()) cu = m_units[idx].get();
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h @@ -35,7 +35,7 @@ lldb_private::DWARFContext &context); size_t GetNumUnits(); - DWARFUnit *GetUnitAtIndex(lldb::user_id_t idx); + DWARFUnit *GetUnitAtIndex(size_t idx); DWARFUnit *GetUnitAtOffset(DIERef::Section section, dw_offset_t cu_offset, uint32_t *idx_ptr = nullptr); DWARFUnit *GetUnitContainingDIEOffset(DIERef::Section section, Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -109,7 +109,7 @@ return m_units.size(); } -DWARFUnit *DWARFDebugInfo::GetUnitAtIndex(user_id_t idx) { +DWARFUnit *DWARFDebugInfo::GetUnitAtIndex(size_t idx) { DWARFUnit *cu = nullptr; if (idx < GetNumUnits()) cu = m_units[idx].get();
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits