[Lldb-commits] [PATCH] D36126: Fix incorrect use of std::unique
Eugene Zemtsov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 31 17:29:07 PDT 2017
eugene created this revision.
eugene added a project: LLDB.
https://reviews.llvm.org/D36126
Files:
source/Symbol/Symtab.cpp
Index: source/Symbol/Symtab.cpp
===================================================================
--- source/Symbol/Symtab.cpp
+++ source/Symbol/Symtab.cpp
@@ -616,8 +616,10 @@
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36126.109036.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170801/da26953c/attachment.bin>
More information about the lldb-commits
mailing list