diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-23 15:10:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-23 15:10:41 +0000 |
commit | 0adabe5a08d510d9d208198a4fd9c5fc752af457 (patch) | |
tree | 843c32798360b374a788e7e87c84d72a3bc17c98 | |
parent | 95889fa9c31779c9ef3e71d633b8d9146648bc97 (diff) | |
download | external_llvm-0adabe5a08d510d9d208198a4fd9c5fc752af457.zip external_llvm-0adabe5a08d510d9d208198a4fd9c5fc752af457.tar.gz external_llvm-0adabe5a08d510d9d208198a4fd9c5fc752af457.tar.bz2 |
revert r148688 too, this isn't safe for DenseMap use. When DenseMap 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
-rw-r--r-- | include/llvm/ADT/OwningPtr.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/ADT/OwningPtr.h b/include/llvm/ADT/OwningPtr.h index e82ebc7..6d9c305 100644 --- a/include/llvm/ADT/OwningPtr.h +++ b/include/llvm/ADT/OwningPtr.h @@ -25,15 +25,12 @@ namespace llvm { /// pointee object can be taken away from OwningPtr by using the take method. template<class T> class OwningPtr { - OwningPtr &operator=(const OwningPtr &); // DO NOT IMPLEMENT + OwningPtr(OwningPtr const &); // DO NOT IMPLEMENT + OwningPtr &operator=(OwningPtr const &); // DO NOT IMPLEMENT T *Ptr; public: explicit OwningPtr(T *P = 0) : Ptr(P) {} - OwningPtr(const OwningPtr &RHS) : Ptr(0) { - assert(RHS.Ptr == 0 && "Only null OwningPtr's are copyable!"); - } - ~OwningPtr() { delete Ptr; } |