forked from OSchip/llvm-project
parent
6cdb5a61b5
commit
9c410c1b21
|
@ -616,8 +616,10 @@ void Symtab::SortSymbolIndexesByValue(std::vector<uint32_t> &indexes,
|
|||
std::stable_sort(indexes.begin(), indexes.end(), comparator);
|
||||
|
||||
// Remove any duplicates if requested
|
||||
if (remove_duplicates)
|
||||
std::unique(indexes.begin(), indexes.end());
|
||||
if (remove_duplicates) {
|
||||
auto last = std::unique(indexes.begin(), indexes.end());
|
||||
indexes.erase(last, indexes.end());
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name,
|
||||
|
|
Loading…
Reference in New Issue