mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-21 17:46:17 +00:00
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
This commit is contained in:
parent
95889fa9c3
commit
0adabe5a08
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user