[Lldb-commits] [lldb] 516ba15 - [lldb] [nfc] Simplify user_id_t -> size_t
Jan Kratochvil via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 17 01:25:34 PST 2020
Author: Jan Kratochvil
Date: 2020-02-17T10:24:19+01:00
New Revision: 516ba158b6890bbcca71527ae0719de151b9de5f
URL: https://github.com/llvm/llvm-project/commit/516ba158b6890bbcca71527ae0719de151b9de5f
DIFF: https://github.com/llvm/llvm-project/commit/516ba158b6890bbcca71527ae0719de151b9de5f.diff
LOG: [lldb] [nfc] Simplify user_id_t -> size_t
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
Added:
Modified:
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
index 4cb27e971775..8ca1a8fc311c 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
@@ -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();
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
index 056cf33a202f..db6a0f80ff45 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
@@ -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,
More information about the lldb-commits
mailing list