[llvm] r218295 - [ADT/IntrusiveRefCntPtr] Give friend access to IntrusiveRefCntPtr<X> so the relevant move constructor can access 'Obj'.

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Sep 22 23:06:43 PDT 2014


Author: akirtzidis
Date: Tue Sep 23 01:06:43 2014
New Revision: 218295

URL: http://llvm.org/viewvc/llvm-project?rev=218295&view=rev
Log:
[ADT/IntrusiveRefCntPtr] Give friend access to IntrusiveRefCntPtr<X> so the relevant move constructor can access 'Obj'.

Modified:
    llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h

Modified: llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h?rev=218295&r1=218294&r2=218295&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h (original)
+++ llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h Tue Sep 23 01:06:43 2014
@@ -197,6 +197,9 @@ public:
   private:
     void retain() { if (Obj) IntrusiveRefCntPtrInfo<T>::retain(Obj); }
     void release() { if (Obj) IntrusiveRefCntPtrInfo<T>::release(Obj); }
+
+    template <typename X>
+    friend class IntrusiveRefCntPtr;
   };
 
   template<class T, class U>





More information about the llvm-commits mailing list