File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1111
1212#include " show_symbol_table.h"
1313
14+ #include < algorithm>
1415#include < iostream>
1516#include < memory>
1617
@@ -68,16 +69,16 @@ void show_symbol_table_plain(
6869 out << ' \n ' << " Symbols:" << ' \n ' << ' \n ' ;
6970
7071 // we want to sort alphabetically
71- std::set<std::string> symbols;
72+ std::vector<std::string> symbols;
73+ symbols.reserve (symbol_table.symbols .size ());
7274
7375 for (const auto &symbol_pair : symbol_table.symbols )
74- {
75- symbols.insert (id2string (symbol_pair.first ));
76- }
76+ symbols.push_back (id2string (symbol_pair.first ));
77+ std::sort (symbols.begin (), symbols.end ());
7778
7879 const namespacet ns (symbol_table);
7980
80- for (const std::string &id : symbols)
81+ for (const irep_idt &id : symbols)
8182 {
8283 const symbolt &symbol=ns.lookup (id);
8384
You can’t perform that action at this time.
0 commit comments