llvm.org GIT mirror llvm / 0adabe5
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 Chris Lattner 8 years ago
1 changed file(s) with 2 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2424 /// pointee object can be taken away from OwningPtr by using the take method.
2525 template
2626 class OwningPtr {
27 OwningPtr &operator=(const OwningPtr &); // DO NOT IMPLEMENT
27 OwningPtr(OwningPtr const &); // DO NOT IMPLEMENT
28 OwningPtr &operator=(OwningPtr const &); // DO NOT IMPLEMENT
2829 T *Ptr;
2930 public:
3031 explicit OwningPtr(T *P = 0) : Ptr(P) {}
31
32 OwningPtr(const OwningPtr &RHS) : Ptr(0) {
33 assert(RHS.Ptr == 0 && "Only null OwningPtr's are copyable!");
34 }
3532
3633 ~OwningPtr() {
3734 delete Ptr;