mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
revert r148688 too, this isn't safe for DenseMap use. When DenseMap resizes, it will need to copy around arbitrary pointers
llvm-svn: 148699
This commit is contained in:
parent
4dbbd66de9
commit
7f4e7ce468
@ -25,15 +25,12 @@ namespace llvm {
|
|||||||
/// pointee object can be taken away from OwningPtr by using the take method.
|
/// pointee object can be taken away from OwningPtr by using the take method.
|
||||||
template<class T>
|
template<class T>
|
||||||
class OwningPtr {
|
class OwningPtr {
|
||||||
OwningPtr &operator=(const OwningPtr &); // DO NOT IMPLEMENT
|
OwningPtr(OwningPtr const &); // DO NOT IMPLEMENT
|
||||||
|
OwningPtr &operator=(OwningPtr const &); // DO NOT IMPLEMENT
|
||||||
T *Ptr;
|
T *Ptr;
|
||||||
public:
|
public:
|
||||||
explicit OwningPtr(T *P = 0) : Ptr(P) {}
|
explicit OwningPtr(T *P = 0) : Ptr(P) {}
|
||||||
|
|
||||||
OwningPtr(const OwningPtr &RHS) : Ptr(0) {
|
|
||||||
assert(RHS.Ptr == 0 && "Only null OwningPtr's are copyable!");
|
|
||||||
}
|
|
||||||
|
|
||||||
~OwningPtr() {
|
~OwningPtr() {
|
||||||
delete Ptr;
|
delete Ptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user