summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-02 17:08:31 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-02 17:08:31 +0000
commit3135d45300e4381f077847912be989c3e94f930e (patch)
tree78107efcb5dea93308bf773830310e8a3573b6b1 /lib/Frontend/CompilerInvocation.cpp
parentf9c494f379bbd133a85172cd6e4abd7a23a7e454 (diff)
downloadclang-3135d45300e4381f077847912be989c3e94f930e.tar.gz
clang-3135d45300e4381f077847912be989c3e94f930e.tar.bz2
clang-3135d45300e4381f077847912be989c3e94f930e.tar.xz
[C++11] Use std::atomic instead of LLVM's.
No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index c2571d716a..85aae236b8 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -28,13 +28,13 @@
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
-#include "llvm/Support/Atomic.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/system_error.h"
+#include <atomic>
#include <sys/stat.h>
using namespace clang;
@@ -1883,8 +1883,8 @@ void BuryPointer(const void *Ptr) {
// is what we want in such case.
static const size_t kGraveYardMaxSize = 16;
LLVM_ATTRIBUTE_UNUSED static const void *GraveYard[kGraveYardMaxSize];
- static llvm::sys::cas_flag GraveYardSize;
- llvm::sys::cas_flag Idx = llvm::sys::AtomicIncrement(&GraveYardSize) - 1;
+ static std::atomic<unsigned> GraveYardSize;
+ unsigned Idx = GraveYardSize++;
if (Idx >= kGraveYardMaxSize)
return;
GraveYard[Idx] = Ptr;