summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/polymorphic_ptr_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [C++11] Now that we have C++11 and I've replaced the use of thisChandler Carruth2014-03-091-125/+0
| | | | | | | horrible smart pointer by std::unique_ptr and strict move semantics, rip this out. llvm-svn: 203392
* [C++11] Switch all uses of the llvm_move macro to use std::moveChandler Carruth2014-03-021-1/+1
| | | | | | directly, and remove the macro. llvm-svn: 202612
* [C++11] Remove uses of LLVM_HAS_RVALUE_REFERENCES from the unittests.Chandler Carruth2014-03-011-4/+0
| | | | llvm-svn: 202583
* Fix a null pointer dereference when copying a null polymorphic pointer.Chandler Carruth2013-11-131-0/+6
| | | | | | | | This bug only bit the C++98 build bots because all of the actual uses really do move. ;] But not *quite* ready to do the whole C++11 switch yet, so clean it up. Also add a unit test that catches this immediately. llvm-svn: 194548
* Switch to allow implicit construction. In many cases, we're wrappingChandler Carruth2013-11-091-0/+5
| | | | | | a derived type and this makes it *much* easier to write this code. llvm-svn: 194321
* Test the polymorphic behavior of this utility.Chandler Carruth2013-11-091-1/+33
| | | | llvm-svn: 194320
* Use something really explicit to test "move semantics" on builds withoutChandler Carruth2013-11-091-0/+4
| | | | | | | | | r-value references. I still want to test that when we have them, llvm_move is actually a move. Have I mentioned that I really want to move to C++11? ;] llvm-svn: 194318
* Add the critically missing 'clone' method. =]Chandler Carruth2013-11-091-0/+11
| | | | | | | | | | Clang managed to never instantiate the copy constructor. Added tests to ensure this path is tested. We could still use tests for the polymorphic nature. Those coming up next. llvm-svn: 194317
* Move the test type out of the function and into the anonymous namespaceChandler Carruth2013-11-091-5/+5
| | | | | | to fix C++98 builds. llvm-svn: 194316
* Add a polymorphic_ptr<T> smart pointer data type. It's a somewhat sillyChandler Carruth2013-11-091-0/+71
unique ownership smart pointer which is *deep* copyable by assuming it can call a T::clone() method to allocate a copy of the owned data. This is mostly useful with containers or other collections of uniquely owned data in C++98 where they *might* copy. With C++11 we can likely remove this in favor of move-only types and containers wrapped around those types. llvm-svn: 194315
OpenPOWER on IntegriCloud