aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/SmallPtrSetTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-01-29SmallPtrSetTest: More checks for the swap() testingMatthias Braun1-0/+24
llvm-svn: 259152
2016-01-29SmallPtrSetTest: Check that iterators are still valid after erase()Matthias Braun1-0/+39
llvm-svn: 259151
2014-03-02[C++11] Switch all uses of the llvm_move macro to use std::moveChandler Carruth1-1/+1
directly, and remove the macro. llvm-svn: 202612
2014-03-01[C++11] Remove uses of LLVM_HAS_RVALUE_REFERENCES from the unittests.Chandler Carruth1-2/+0
llvm-svn: 202583
2013-11-20Make the moved-from SmallPtrSet be a valid, empty, small-state object.Chandler Carruth1-7/+21
Enhance the tests to actually require moves in C++11 mode, in addition to testing the moved-from state. Further enhance the tests to cover copy-assignment into a moved-from object and moving a large-state object. (Note that we can't really test small-state vs. large-state as that isn't an observable property of the API really.) This should finish addressing review on r195239. llvm-svn: 195261
2013-11-20Add a test for assignment operator behavior which was changed inChandler Carruth1-1/+25
r195239, as well as a comment about the fact that assigning over a moved-from object was in fact tested. Addresses some of the review feedback on r195239. llvm-svn: 195260
2013-11-20Give SmallPtrSet move semantics when we have R-value references.Chandler Carruth1-0/+49
Somehow, this ADT got missed which is moderately terrifying considering the efficiency of move for it. The code to implement move semantics for it is pretty horrible currently but was written to reasonably closely match the rest of the code. Unittests that cover both copying and moving (at a basic level) added. llvm-svn: 195239
2013-03-29SmallVector and SmallPtrSet allocations now power-of-two aligned.Jean-Luc Duprat1-0/+55
This time tested on both OSX and Linux. llvm-svn: 178377
2013-03-29Revert "Fix allocations of SmallVector and SmallPtrSet so they are more ↵Rafael Espindola1-55/+0
prone to" This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61. It broke the bots: /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest /home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure Value of: v[i].getValue() Actual: 0 Expected: value Which is: 2 llvm-svn: 178334
2013-03-29Fix allocations of SmallVector and SmallPtrSet so they are more prone toJean-Luc Duprat1-0/+55
being power-of-two sized. llvm-svn: 178332
2012-03-06SmallPtrSet: Provide a more efficient implementation of swap than the ↵Benjamin Kramer1-0/+72
default triple-copy std::swap. This currently assumes that both sets have the same SmallSize to keep the implementation simple, a limitation that can be lifted if someone cares. llvm-svn: 152143