Fix comment, per Chris' suggestion.

llvm-svn: 106192
This commit is contained in:
Owen Anderson 2010-06-17 00:51:12 +00:00
parent 93f16372f9
commit 836af6bb36
1 changed files with 4 additions and 1 deletions

View File

@ -254,7 +254,10 @@ Symtab::SortSymbolIndexesByValue (std::vector<uint32_t>& indexes, bool remove_du
if (indexes.size() <= 1)
return;
// Sort the indexes in place using std::sort
// Sort the indexes in place using std::stable_sort.
// NOTE: The use of std::stable_sort instead of std::sort here is strictly for performance,
// not correctness. The indexes vector tends to be "close" to sorted, which the
// stable sort handles better.
std::stable_sort(indexes.begin(), indexes.end(), SymbolIndexComparator(m_symbols));
// Remove any duplicates if requested