From 928fb264a5103c6a2c41f9e9417ac8f44ae896e2 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 5 Mar 2014 16:26:04 +0000 Subject: [PATCH] Work around MSVC bug in IntrusiveRefCntPtr.h The build was failing with: error C2664: 'std::atomic_int::atomic_int(const std::atomic_int &)' : cannot convert argument 1 from 'int' to 'const std::atomic_int &' Apparently "std::atomic_int x(0)" doesn't work, but "std::atomic x(0)" does. llvm-svn: 202988 --- llvm/include/llvm/ADT/IntrusiveRefCntPtr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h index aa7ccdcf9c7f..c46ce9a15987 100644 --- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -99,7 +99,7 @@ namespace llvm { /// management of reference counts. template class ThreadSafeRefCountedBase { - mutable std::atomic_int RefCount; + mutable std::atomic RefCount; protected: ThreadSafeRefCountedBase() : RefCount(0) {}