From 4527fb2f33e34b60d09083d51c2176250b276cda Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 2 Mar 2014 17:08:31 +0000 Subject: [C++11] Use std::atomic instead of LLVM's. No intended functionality change. llvm-svn: 202652 --- clang/lib/Frontend/CompilerInvocation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c2571d71..85aae23 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 #include 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 GraveYardSize; + unsigned Idx = GraveYardSize++; if (Idx >= kGraveYardMaxSize) return; GraveYard[Idx] = Ptr; -- cgit v1.1