summaryrefslogtreecommitdiff
path: root/source/Symbol/Symtab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Symbol/Symtab.cpp')
-rw-r--r--source/Symbol/Symtab.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/source/Symbol/Symtab.cpp b/source/Symbol/Symtab.cpp
index 3e2c965509d3c..4ac30649110fc 100644
--- a/source/Symbol/Symtab.cpp
+++ b/source/Symbol/Symtab.cpp
@@ -399,29 +399,6 @@ void Symtab::InitNameIndexes() {
m_basename_to_index.SizeToFit();
m_method_to_index.Sort();
m_method_to_index.SizeToFit();
-
- // static StreamFile a ("/tmp/a.txt");
- //
- // count = m_basename_to_index.GetSize();
- // if (count)
- // {
- // for (size_t i=0; i<count; ++i)
- // {
- // if (m_basename_to_index.GetValueAtIndex(i, entry.value))
- // a.Printf ("%s BASENAME\n",
- // m_symbols[entry.value].GetMangled().GetName().GetCString());
- // }
- // }
- // count = m_method_to_index.GetSize();
- // if (count)
- // {
- // for (size_t i=0; i<count; ++i)
- // {
- // if (m_method_to_index.GetValueAtIndex(i, entry.value))
- // a.Printf ("%s METHOD\n",
- // m_symbols[entry.value].GetMangled().GetName().GetCString());
- // }
- // }
}
}
@@ -616,8 +593,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,