llvm.org GIT mirror llvm / 116e234
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 Ted Kremenek 9 years ago
1 changed file(s) with 1 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4343 class RefCountedBase {
4444 unsigned ref_cnt;
4545
46 protected:
46 public:
4747 RefCountedBase() : ref_cnt(0) {}
4848
4949 void Retain() { ++ref_cnt; }
5151 assert (ref_cnt > 0 && "Reference count is already zero.");
5252 if (--ref_cnt == 0) delete static_cast(this);
5353 }
54
55 friend class IntrusiveRefCntPtr;
5654 };
5755
5856 //===----------------------------------------------------------------------===//