[C++11] Use std::atomic instead of LLVM's.
No intended functionality change.
llvm-svn: 202652
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp
index 73d6e7f..43b203a 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 <atomic>
using namespace clang;
using namespace clang::vfs;
@@ -828,8 +828,8 @@
}
UniqueID vfs::getNextVirtualUniqueID() {
- static volatile sys::cas_flag UID = 0;
- sys::cas_flag ID = llvm::sys::AtomicIncrement(&UID);
+ static std::atomic<unsigned> 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<uint64_t>::max(), ID);