summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/llvm/ADT/IntrusiveRefCntPtr.h4
-rw-r--r--include/llvm/CompilerDriver/CompilationGraph.h2
-rw-r--r--include/llvm/CompilerDriver/Tool.h2
3 files changed, 4 insertions, 4 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;
};
//===----------------------------------------------------------------------===//
diff --git a/include/llvm/CompilerDriver/CompilationGraph.h b/include/llvm/CompilerDriver/CompilationGraph.h
index e1eea325e3..951aff6f93 100644
--- a/include/llvm/CompilerDriver/CompilationGraph.h
+++ b/include/llvm/CompilerDriver/CompilationGraph.h
@@ -40,7 +40,7 @@ namespace llvmc {
};
/// Edge - Represents an edge of the compilation graph.
- class Edge : public llvm::RefCountedBaseVPTR<Edge> {
+ class Edge : public llvm::RefCountedBaseVPTR {
public:
Edge(const std::string& T) : ToolName_(T) {}
virtual ~Edge() {}
diff --git a/include/llvm/CompilerDriver/Tool.h b/include/llvm/CompilerDriver/Tool.h
index d0926ba983..18a2b76792 100644
--- a/include/llvm/CompilerDriver/Tool.h
+++ b/include/llvm/CompilerDriver/Tool.h
@@ -33,7 +33,7 @@ namespace llvmc {
typedef llvm::StringSet<> InputLanguagesSet;
/// Tool - Represents a single tool.
- class Tool : public llvm::RefCountedBaseVPTR<Tool> {
+ class Tool : public llvm::RefCountedBaseVPTR {
public:
virtual ~Tool() {}