[PATCH] D53247: [ADT] Add initializer_list constructor, equality tests for DenseMap/DenseSet.

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 13 15:29:13 PDT 2018


lhames created this revision.
lhames added reviewers: chandlerc, dblaikie.
Herald added subscribers: kristina, dexonsmith.

Adds an initializer_list constructor to DenseMap and fixes a bug in the
initializer_list constructor for DenseSet (it previously crashed on
initializer_lists whose lengths were not a power of two).

Also adds equality and inequality operators for DenseMap and DenseSet.

These changes make it easier to migrate existing code that uses std::map and
std::set (which support initializer_list construction and equality comparison)
to DenseMap and DenseSet.


Repository:
  rL LLVM

https://reviews.llvm.org/D53247

Files:
  include/llvm/ADT/DenseMap.h
  include/llvm/ADT/DenseSet.h
  unittests/ADT/DenseMapTest.cpp
  unittests/ADT/DenseSetTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53247.169581.patch
Type: text/x-patch
Size: 5175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181013/450a0add/attachment.bin>


More information about the llvm-commits mailing list