Skip to content

Commit

Permalink
[lldb] [nfc] Simplify user_id_t -> size_t
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jankratochvil committed Feb 17, 2020
1 parent 3e10909 commit 516ba15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DWARFDebugInfo {
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,
Expand Down

0 comments on commit 516ba15

Please sign in to comment.