Page MenuHomePhabricator

Use LLVM's DenseSet insteead of unordered_set.

Authored by ruiu on Feb 13 2018, 1:21 PM.

Diff Detail


Event Timeline

ruiu created this revision.Feb 13 2018, 1:21 PM
efriedma added inline comments.
37 ↗(On Diff #134106)

Don't you need a SetVector here?

ruiu added inline comments.Feb 13 2018, 1:39 PM
37 ↗(On Diff #134106)

Forgive my ignorance, but what's the difference between DenseSet and SetVector?

efriedma added inline comments.Feb 13 2018, 1:48 PM
37 ↗(On Diff #134106)

Iterating over a SetVector produces values in the order they were inserted; iterating over a DenseSet uses an arbitrary ordering. See .

ruiu added inline comments.Feb 13 2018, 1:49 PM
37 ↗(On Diff #134106)

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.

ruiu updated this revision to Diff 134112.Feb 13 2018, 2:12 PM
  • use SetVector instead of DenseMap
sbc100 accepted this revision.Feb 13 2018, 2:29 PM
This revision is now accepted and ready to land.Feb 13 2018, 2:29 PM
This revision was automatically updated to reflect the committed changes.