summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/OwningPtr.h
Commit message (Collapse)AuthorAge
* Use only explicit bool conversion operatorsDavid Blaikie2013-05-15
| | | | | | | | | | | | | | | | | | | | | | | BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181868 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix include guards so they exactly match file names.Jakub Staszak2013-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.Chandler Carruth2012-11-30
| | | | | | | | | | | | | | Rationale: 1) This was the name in the comment block. ;] 2) It matches Clang's __has_feature naming convention. 3) It matches other compiler-feature-test conventions. Sorry for the noise. =] I've also switch the comment block to use a \brief tag and not duplicate the name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168996 91177308-0d34-0410-b5e6-96231b3b80d8
* Add move constructors for OwningPtr and OwningArrayPtr.Jordan Rose2012-10-18
| | | | | | | While LLVM itself is still C++03, there's no reason why tools built on top of it can't use C++11 features. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166242 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark unimplemented copy constructors and copy assignment operators as ↵Craig Topper2012-09-17
| | | | | | LLVM_DELETED_FUNCTION. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164014 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r148688 too, this isn't safe for DenseMap use. When DenseMap ↵Chris Lattner2012-01-23
| | | | | | resizes, it will need to copy around arbitrary pointers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148699 91177308-0d34-0410-b5e6-96231b3b80d8
* allow OwningPtr to be copy constructed if null, which is required toChris Lattner2012-01-23
| | | | | | | make them be a valuetype in a DenseMap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148688 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MaybeOwningPtr. We're going to use reference-counting instead.Douglas Gregor2010-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100499 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MaybeOwningPtr, a smart pointer that may (or may not) haveDouglas Gregor2010-04-05
| | | | | | | | | ownership over the pointer it contains. Useful when we want to communicate ownership while still having several clients holding on to the same pointer *without* introducing reference counting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100463 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed lint errors:Misha Brukman2009-02-20
| | | | | | | | | * Alphabetized #includes * Removed trailing whitespace * Wrapped or shortened lines over 80 chars git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65181 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed trailing whitespace.Misha Brukman2009-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62000 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'delete []' instead of 'delete' in OwningArray::reset().Ted Kremenek2008-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60703 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing include (for ptrdiff_t).Eli Friedman2008-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47576 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-29
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* Added OwningArrayPtr smart pointer class to provide an analogous class toTed Kremenek2007-12-20
| | | | | | | OwningPtr except that it works for pointers to arrays. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45266 91177308-0d34-0410-b5e6-96231b3b80d8
* add new smart pointer for clang.Chris Lattner2007-12-20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45261 91177308-0d34-0410-b5e6-96231b3b80d8