diff options
Diffstat (limited to 'lib/Support/ManagedStatic.cpp')
-rw-r--r-- | lib/Support/ManagedStatic.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Support/ManagedStatic.cpp b/lib/Support/ManagedStatic.cpp index 098cccb68d..c19f8cb485 100644 --- a/lib/Support/ManagedStatic.cpp +++ b/lib/Support/ManagedStatic.cpp @@ -13,7 +13,6 @@ #include "llvm/Support/ManagedStatic.h" #include "llvm/Config/config.h" -#include "llvm/Support/Atomic.h" #include <cassert> using namespace llvm; @@ -28,7 +27,7 @@ void ManagedStaticBase::RegisterManagedStatic(void *(*Creator)(), void* tmp = Creator ? Creator() : 0; TsanHappensBefore(this); - sys::MemoryFence(); + std::atomic_thread_fence(std::memory_order_seq_cst); // This write is racy against the first read in the ManagedStatic // accessors. The race is benign because it does a second read after a |