X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FOwningPtr.h;h=ea9495d38693e6ddc2f90ef3c6265f685a1a95c4;hb=e53d6051b7e173722351a5647bfd71eebee3d837;hp=cc53c8c30c1216c8bdaad394ab6a147c989117a0;hpb=a2769a33c94f021a609a462b28ebea069eba6f74;p=oota-llvm.git diff --git a/include/llvm/ADT/OwningPtr.h b/include/llvm/ADT/OwningPtr.h index cc53c8c30c1..ea9495d3869 100644 --- a/include/llvm/ADT/OwningPtr.h +++ b/include/llvm/ADT/OwningPtr.h @@ -14,6 +14,7 @@ #ifndef LLVM_ADT_OWNING_PTR_H #define LLVM_ADT_OWNING_PTR_H +#include "llvm/Support/Compiler.h" #include #include @@ -25,8 +26,8 @@ namespace llvm { /// pointee object can be taken away from OwningPtr by using the take method. template class OwningPtr { - OwningPtr(OwningPtr const &); // DO NOT IMPLEMENT - OwningPtr &operator=(OwningPtr const &); // DO NOT IMPLEMENT + OwningPtr(OwningPtr const &) LLVM_DELETED_FUNCTION; + OwningPtr &operator=(OwningPtr const &) LLVM_DELETED_FUNCTION; T *Ptr; public: explicit OwningPtr(T *P = 0) : Ptr(P) {} @@ -79,8 +80,8 @@ inline void swap(OwningPtr &a, OwningPtr &b) { /// functionality as OwningPtr, except that it works for array types. template class OwningArrayPtr { - OwningArrayPtr(OwningArrayPtr const &); // DO NOT IMPLEMENT - OwningArrayPtr &operator=(OwningArrayPtr const &); // DO NOT IMPLEMENT + OwningArrayPtr(OwningArrayPtr const &) LLVM_DELETED_FUNCTION; + OwningArrayPtr &operator=(OwningArrayPtr const &) LLVM_DELETED_FUNCTION; T *Ptr; public: explicit OwningArrayPtr(T *P = 0) : Ptr(P) {} @@ -128,7 +129,6 @@ inline void swap(OwningArrayPtr &a, OwningArrayPtr &b) { a.swap(b); } - } // end namespace llvm #endif