mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +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.
|
||||
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