1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[ADT] Attempt to fix GCC warning in IntrusiveRefCntPtrTest.

Our copy constructor doesn't explicitly invoke the base class's
constructor, and GCC is (rightly) concerned.

llvm-svn: 291023
This commit is contained in:
Justin Lebar 2017-01-04 22:49:55 +00:00
parent 750d75bf50
commit 12b3022bd3

View File

@ -15,7 +15,9 @@ namespace llvm {
namespace {
struct SimpleRefCounted : public RefCountedBase<SimpleRefCounted> {
SimpleRefCounted() { ++NumInstances; }
SimpleRefCounted(const SimpleRefCounted &) { ++NumInstances; }
SimpleRefCounted(const SimpleRefCounted &) : RefCountedBase() {
++NumInstances;
}
~SimpleRefCounted() { --NumInstances; }
static int NumInstances;