[mips][ias] Replace anchor comments with anchor instructions in tests.
[oota-llvm.git] / lib / Support / Statistic.cpp
index 9d075736b3035fa2ddfe5a4da9b9c33f33cc29d2..ee6c1305cdbe526473b0946c23168b6a6152b67a 100644 (file)
@@ -24,6 +24,7 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/ManagedStatic.h"
@@ -76,7 +77,7 @@ void Statistic::RegisterStatistic() {
       StatInfo->addStatistic(this);
 
     TsanHappensBefore(this);
-    std::atomic_thread_fence(std::memory_order_seq_cst);
+    sys::MemoryFence();
     // Remember we have been registered.
     TsanIgnoreWritesBegin();
     Initialized = true;