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/Basic/VirtualFileSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/Basic/VirtualFileSystem.cpp') diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp index 73d6e7f7b2b..43b203a334e 100644 --- a/clang/lib/Basic/VirtualFileSystem.cpp +++ b/clang/lib/Basic/VirtualFileSystem.cpp @@ -14,10 +14,10 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/Atomic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/YAMLParser.h" +#include using namespace clang; using namespace clang::vfs; @@ -828,8 +828,8 @@ vfs::getVFSFromYAML(MemoryBuffer *Buffer, SourceMgr::DiagHandlerTy DiagHandler, } UniqueID vfs::getNextVirtualUniqueID() { - static volatile sys::cas_flag UID = 0; - sys::cas_flag ID = llvm::sys::AtomicIncrement(&UID); + static std::atomic UID; + unsigned ID = ++UID; // The following assumes that uint64_t max will never collide with a real // dev_t value from the OS. return UniqueID(std::numeric_limits::max(), ID); -- cgit v1.2.3