[ADT/IntrusiveRefCntPtr] Give friend access to IntrusiveRefCntPtr<X> so the relevant...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Sep 2014 06:06:43 +0000 (06:06 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 23 Sep 2014 06:06:43 +0000 (06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218295 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/IntrusiveRefCntPtr.h

index f9df3781257e4678df616010d561ace064d081ca..c859c98d06b20cd53b34152257b651546938662f 100644 (file)
@@ -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>