[lldb] [nfc] Simplify user_id_t -> size_t
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 17 Feb 2020 09:24:19 +0000 (10:24 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 17 Feb 2020 09:24:19 +0000 (10:24 +0100)
As discussed in https://reviews.llvm.org/D73206#1871895> 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());

Differential Revision: https://reviews.llvm.org/D74670

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h

index 4cb27e9..8ca1a8f 100644 (file)
@@ -109,7 +109,7 @@ size_t DWARFDebugInfo::GetNumUnits() {
   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 056cf33..db6a0f8 100644 (file)
@@ -35,7 +35,7 @@ public:
                           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,