[llvm-branch-commits] [llvm] a61d508 - [llvm][NFC] Made RefCountBase constructors protected

Nathan James via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 7 12:27:18 PST 2020


Author: Nathan James
Date: 2020-12-07T20:23:11Z
New Revision: a61d5084735a6990d895825262d4870ede0535ef

URL: https://github.com/llvm/llvm-project/commit/a61d5084735a6990d895825262d4870ede0535ef
DIFF: https://github.com/llvm/llvm-project/commit/a61d5084735a6990d895825262d4870ede0535ef.diff

LOG: [llvm][NFC] Made RefCountBase constructors protected

Matches ThreadSafeRefCountBase and forces the class to be inherited.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
index 7e6585378ec4..173fad3aeafa 100644
--- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -70,7 +70,7 @@ namespace llvm {
 template <class Derived> class RefCountedBase {
   mutable unsigned RefCount = 0;
 
-public:
+protected:
   RefCountedBase() = default;
   RefCountedBase(const RefCountedBase &) {}
   RefCountedBase &operator=(const RefCountedBase &) = delete;


        


More information about the llvm-branch-commits mailing list