mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 08:27:50 +00:00
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
This commit is contained in:
parent
03aff468c9
commit
2e5be0cb6f
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user