<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 13, 2018 at 1:49 PM Rui Ueyama via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added inline comments.<br>
<br>
<br>
================<br>
Comment at: lld/wasm/SymbolTable.cpp:37<br>
 void SymbolTable::reportRemainingUndefines() {<br>
-  std::unordered_set<Symbol *> Undefs;<br>
+  DenseSet<Symbol *> Undefs;<br>
   for (Symbol *Sym : SymVector) {<br>
----------------<br>
efriedma wrote:<br>
> ruiu wrote:<br>
> > efriedma wrote:<br>
> > > Don't you need a SetVector here?<br>
> > Forgive my ignorance, but what's the difference between DenseSet and SetVector?<br>
> Iterating over a SetVector produces values in the order they were inserted; iterating over a DenseSet uses an arbitrary ordering.  See <a href="http://llvm.org/docs/ProgrammersManual.html#llvm-adt-setvector-h" rel="noreferrer" target="_blank">http://llvm.org/docs/ProgrammersManual.html#llvm-adt-setvector-h</a> .<br>
Ah, thanks. This code is to produce error messages, so the order of the output of this code doesn't have to be deterministic, but it is still nice if it's deterministic. I'll make a change to use SetVector.<br></blockquote><div><br>I'm pretty sure in other cases across the LLVM project determinism of output, even for diagnostics, is considered necessary. (usually this comes up simply enough in test cases - if diagnostic order isn't deterministic, test cases fail on one platform and succeed on another, or fail randomly depending on hash of memory layout, etc)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D43254" rel="noreferrer" target="_blank">https://reviews.llvm.org/D43254</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>