summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/ilistTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly default ilistTest::Node's copy constructorDavid Blaikie2015-03-041-1/+2
| | | | | | | In the presence of a user-declared dtor, calling an implicit copy ctor is deprecated in C++11. llvm-svn: 231256
* Revert "Remove the explicit SDNodeIterator::operator= in favor of the ↵David Blaikie2015-03-031-3/+1
| | | | | | | | | | | implicit default" Accidentally committed a few more of these cleanup changes than intended. Still breaking these out & tidying them up. This reverts commit r231135. llvm-svn: 231136
* Remove the explicit SDNodeIterator::operator= in favor of the implicit defaultDavid Blaikie2015-03-031-1/+3
| | | | | | | | | | There doesn't seem to be any need to assert that iterator assignment is between iterators over the same node - if you want to reuse an iterator variable to iterate another node, that's perfectly acceptable. Just don't mix comparisons between iterators into disjoint sequences, as usual. llvm-svn: 231135
* [C++11] Use 'nullptr'.Craig Topper2014-06-081-2/+2
| | | | llvm-svn: 210442
* [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.Benjamin Kramer2014-03-021-3/+3
| | | | | | Remove the old functions. llvm-svn: 202636
* Add an iplist::clearAndLeakNodesUnsafely() function.Jakob Stoklund Olesen2013-01-041-0/+33
| | | | | | | | | | | | The iplist::clear() function can be quite expensive because it traverses the entire list, calling deleteNode() and removeNodeFromList() on each element. If node destruction and deallocation can be handled some other way, clearAndLeakNodesUnsafely() can be used to jettison all nodes without bringing them into cache. The function name is meant to be ominous. llvm-svn: 171540
* Sort a few more #include lines in tools/... unittests/... and utils/...Chandler Carruth2013-01-021-1/+1
| | | | llvm-svn: 171363
* Add an assertion for a likely ilist::splice() contract violation.Jakob Stoklund Olesen2012-12-181-0/+21
| | | | | | | | | | | | | | | | | | | | | | | The single-element ilist::splice() function supports a noop move: List.splice(I, List, I); The corresponding std::list function doesn't allow that, so add a unit test to document that behavior. This also means that List.splice(I, List, F); is somewhat surprisingly not equivalent to List.splice(I, List, F, next(F)); This patch adds an assertion to catch the illegal case I == F above. Alternatively, we could make I == F a legal noop, but that would make ilist differ even more from std::list. llvm-svn: 170443
* Sort the #include lines for unittest/...Chandler Carruth2012-12-041-2/+2
| | | | llvm-svn: 169250
* Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.Daniel Dunbar2010-05-131-0/+5
| | | | llvm-svn: 103723
* ADT: Add ilist_node::get{Prev,Next}Node, which return the adjacent node or null.Daniel Dunbar2010-05-121-0/+39
- This provides a convenient alternative to using something llvm::prior or manual iterator access, for example:: if (T *Prev = foo->getPrevNode()) ... instead of:: iterator it(foo); if (it != begin()) { --it; ... } - Chris, please review. llvm-svn: 103647
OpenPOWER on IntegriCloud