summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/IntrusiveRefCntPtr.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-20 06:14:56 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-20 06:14:56 +0000
commitb518c25b3e3ec03da389ca48910ded42ca1305e3 (patch)
treecbac85da99da4436cceedd26f6d06e03f153dfd4 /include/llvm/ADT/IntrusiveRefCntPtr.h
parent682eed0da8e42770a0e694390ba929fd4d241657 (diff)
downloadllvm-b518c25b3e3ec03da389ca48910ded42ca1305e3.tar.gz
llvm-b518c25b3e3ec03da389ca48910ded42ca1305e3.tar.bz2
llvm-b518c25b3e3ec03da389ca48910ded42ca1305e3.tar.xz
If a class inherits from RefCountedBaseVPTR allow all its subclasses to be used with IntrusiveRefCntPtr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/IntrusiveRefCntPtr.h')
-rw-r--r--include/llvm/ADT/IntrusiveRefCntPtr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h
index 37d4ac9d29..e6926de413 100644
--- a/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -64,7 +64,6 @@ namespace llvm {
/// inherit from RefCountedBaseVPTR can't be allocated on stack -
/// attempting to do this will produce a compile error.
//===----------------------------------------------------------------------===//
- template <class Derived>
class RefCountedBaseVPTR {
unsigned ref_cnt;
@@ -78,7 +77,8 @@ namespace llvm {
if (--ref_cnt == 0) delete this;
}
- friend class IntrusiveRefCntPtr<Derived>;
+ template <typename T>
+ friend class IntrusiveRefCntPtr;
};
//===----------------------------------------------------------------------===//