From 116e2348edee6c216a9e37484b62fc2fda595208 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 22 Mar 2011 01:15:07 +0000 Subject: [PATCH] Relax access control on 'Release' method of RefCountedBase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128054 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/IntrusiveRefCntPtr.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h index f195fb1de8a..592e42f7adc 100644 --- a/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -44,7 +44,7 @@ namespace llvm { class RefCountedBase { unsigned ref_cnt; - protected: + public: RefCountedBase() : ref_cnt(0) {} void Retain() { ++ref_cnt; } @@ -52,8 +52,6 @@ namespace llvm { assert (ref_cnt > 0 && "Reference count is already zero."); if (--ref_cnt == 0) delete static_cast(this); } - - friend class IntrusiveRefCntPtr; }; //===----------------------------------------------------------------------===//