summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-03-05 16:26:04 +0000
committerHans Wennborg <hans@hanshq.net>2014-03-05 16:26:04 +0000
commitbe5c5d77573e97abff427216a806d0bd53e291df (patch)
tree70c4590a1ac084ffec78a64e56ac7da263105a7e /include
parent0d31d1e61271ad4d93c1c567a97fef4077124b8c (diff)
downloadllvm-be5c5d77573e97abff427216a806d0bd53e291df.tar.gz
llvm-be5c5d77573e97abff427216a806d0bd53e291df.tar.bz2
llvm-be5c5d77573e97abff427216a806d0bd53e291df.tar.xz
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<int> x(0)" does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/IntrusiveRefCntPtr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h
index aa7ccdcf9c..c46ce9a159 100644
--- a/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -99,7 +99,7 @@ namespace llvm {
/// management of reference counts.
template <class Derived>
class ThreadSafeRefCountedBase {
- mutable std::atomic_int RefCount;
+ mutable std::atomic<int> RefCount;
protected:
ThreadSafeRefCountedBase() : RefCount(0) {}