diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-02 17:08:31 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-02 17:08:31 +0000 |
commit | 4527fb2f33e34b60d09083d51c2176250b276cda (patch) | |
tree | 5ed9c642415dcabd35e32ac8587f8f6be5d850f2 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | b5846f9e1568c9e08b22380970d012db62cbb0bb (diff) | |
download | bcm5719-llvm-4527fb2f33e34b60d09083d51c2176250b276cda.tar.gz bcm5719-llvm-4527fb2f33e34b60d09083d51c2176250b276cda.zip |
[C++11] Use std::atomic instead of LLVM's.
No intended functionality change.
llvm-svn: 202652
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c2571d716a6..85aae236b8a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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; |