From 2e5be0cb6f5dc920523430f7c217e94de74be105 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 13 May 2018 19:04:17 +0000 Subject: [PATCH] Use const_iterator in DWARFUnit Function DWARFUnit::GetDIE is using m_die_array only for reading so it can use DWARFDebugInfoEntry::const_iterator. llvm-svn: 332201 --- lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp index 55d40fd44145..af7291a601c2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -450,9 +450,9 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) { if (ContainsDIEOffset(die_offset)) { ExtractDIEsIfNeeded(false); - DWARFDebugInfoEntry::iterator end = m_die_array.end(); - DWARFDebugInfoEntry::iterator pos = - lower_bound(m_die_array.begin(), end, die_offset, CompareDIEOffset); + DWARFDebugInfoEntry::const_iterator end = m_die_array.cend(); + DWARFDebugInfoEntry::const_iterator pos = + lower_bound(m_die_array.cbegin(), end, die_offset, CompareDIEOffset); if (pos != end) { if (die_offset == (*pos).GetOffset()) return DWARFDIE(this, &(*pos));