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.

llvm-svn: 202988
This commit is contained in:
Hans Wennborg 2014-03-05 16:26:04 +00:00
parent 9de3a98c4e
commit 928fb264a5
1 changed files with 1 additions and 1 deletions

View File

@ -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) {}