[Lldb-commits] [lldb] r309648 - Fix incorrect use of std::unique
Eugene Zemtsov via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 31 18:29:55 PDT 2017
Author: eugene
Date: Mon Jul 31 18:29:55 2017
New Revision: 309648
URL: http://llvm.org/viewvc/llvm-project?rev=309648&view=rev
Log:
Fix incorrect use of std::unique
Modified:
lldb/trunk/source/Symbol/Symtab.cpp
Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=309648&r1=309647&r2=309648&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Mon Jul 31 18:29:55 2017
@@ -616,8 +616,10 @@ void Symtab::SortSymbolIndexesByValue(st
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,
More information about the lldb-commits
mailing list