[PATCH] D43254: Use LLVM's DenseSet insteead of unordered_set.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 13:48:03 PST 2018


efriedma added inline comments.


================
Comment at: lld/wasm/SymbolTable.cpp:37
 void SymbolTable::reportRemainingUndefines() {
-  std::unordered_set<Symbol *> Undefs;
+  DenseSet<Symbol *> Undefs;
   for (Symbol *Sym : SymVector) {
----------------
ruiu wrote:
> efriedma wrote:
> > Don't you need a SetVector here?
> Forgive my ignorance, but what's the difference between DenseSet and SetVector?
Iterating over a SetVector produces values in the order they were inserted; iterating over a DenseSet uses an arbitrary ordering.  See http://llvm.org/docs/ProgrammersManual.html#llvm-adt-setvector-h .


https://reviews.llvm.org/D43254





More information about the llvm-commits mailing list