Update both the src and dst pointers at the end of the loop.

Stephen Wilson is working on a better performing patch in the meantime.

llvm-svn: 129605
This commit is contained in:
Johnny Chen 2011-04-15 20:59:46 +00:00
parent 5d3d3fa33d
commit fec280e750
1 changed files with 1 additions and 1 deletions

View File

@ -322,7 +322,7 @@ DWARFDebugAranges::Sort()
// Remove the merged ranges by shifting down all the keepers...
std::set<size_t> purged(indices.begin(), indices.end());
size_t new_size = m_aranges.size() - indices.size();
for (size_t src = 0, dst = 0; dst < new_size; ++dst)
for (size_t src = 0, dst = 0; dst < new_size; ++src, ++dst)
{
while (purged.count(src) > 0)
++src;