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; }; //===----------------------------------------------------------------------===//