summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/DenseSetTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [ADT] Fix a bug in DenseSet's initializer_list constructor.Lang Hames2018-10-151-0/+8
| | | | | | | Without this fix, DenseSet crashes with an assertion if constructed with an initializer_list whose length is not a power of two. llvm-svn: 344542
* [ADT] Adds equality operators for DenseMap and DenseSet, and an initializer_listLang Hames2018-10-151-0/+9
| | | | | | | | | | constructor for DenseMap (DenseSet already had an initializer_list constructor). 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. llvm-svn: 344522
* Fix DenseSet::ConstIterator typedefsDavid Blaikie2018-09-201-0/+7
| | | | | | | | | | Fix DenseSet::ConstIterator pointer/reference typedefs to be const Patch by Brad Moody! Differential Revision: https://reviews.llvm.org/D52260 llvm-svn: 342697
* Fix typos of occurred and occurrenceMalcolm Parsons2018-01-241-1/+1
| | | | llvm-svn: 323318
* Add support for DenseMap/DenseSet count and find using const pointersDaniel Berlin2017-03-101-0/+13
| | | | | | | | | | | | | | Summary: Similar to SmallPtrSet, this makes find and count work with both const referneces and const pointers. Reviewers: dblaikie Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D30713 llvm-svn: 297424
* Add test for default construction coverage of DenseSet iterators.Dean Michael Berris2017-01-241-1/+8
| | | | | | This is a follow-up to D28999. llvm-svn: 292885
* Allow DenseSet::iterators to be conveted to and compared with const_iteratorDean Michael Berris2017-01-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: This seemed to be an oversight seeing as DenseMap has these conversions. This patch does the following: - Adds a default constructor to the iterators. - Allows DenseSet::ConstIterators to be copy constructed from DenseSet::Iterators - Allows mutual comparison between Iterators and ConstIterators. All of these are available in the DenseMap implementation, so the implementation here is trivial. Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28999 llvm-svn: 292879
* [ADT] Add an initializer_list constructor to {Small,}DenseSet.Justin Lebar2016-10-171-0/+15
| | | | | | | | | | Reviewers: timshen Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25629 llvm-svn: 284433
* [ADT] Add SmallDenseSet.Justin Lebar2016-10-171-1/+5
| | | | | | | | | | | | Summary: This matches SmallDenseMap. Reviewers: timshen Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25628 llvm-svn: 284432
* [ADT] Add missing const_iterator DenseSet::find() constVitaly Buka2016-10-051-11/+25
| | | | | | | | | | | | Summary: Probably overlooked. Reviewers: eugenis, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24689 llvm-svn: 283377
* [ADT] Add a reserve() method to DenseSet as well as an insert() for R-valueMehdi Amini2016-08-131-0/+71
| | | | | | Recommit 278600 with some fixes to make the test more robust. llvm-svn: 278604
* Revert "[ADT] Add a reserve method to DenseSet as well as an insert() for ↵Mehdi Amini2016-08-131-63/+0
| | | | | | | | | R-value" This reverts commit r278600. The unittest does not pass on MSVC, there is an extra move. Investigating how to make it more robust. llvm-svn: 278603
* [ADT] Add a reserve method to DenseSet as well as an insert() for R-valueMehdi Amini2016-08-131-0/+63
| | | | llvm-svn: 278600
* [ADT] Add a 'find_as' operation to DenseSet.Lang Hames2014-10-191-0/+38
| | | | | | | | | | This operation is analogous to its counterpart in DenseMap: It allows lookup via cheap-to-construct keys (provided that getHashValue and isEqual are implemented for the cheap key-type in the DenseMapInfo specialization). Thanks to Chandler for the review. llvm-svn: 220168
* Fix some -Wsign-compare fallout from changing container count member ↵David Blaikie2014-06-201-1/+1
| | | | | | functions to return unsigned instead of bool. llvm-svn: 211393
* Fix includes of llvm files that used angle brackets.Craig Topper2012-09-151-1/+1
| | | | llvm-svn: 163979
* Prevent looping when DenseSet is abused.Stuart Hastings2009-05-011-0/+30
llvm-svn: 70572
OpenPOWER on IntegriCloud