summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r--llvm/lib/Support/Timer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index 0456f5d6383..03845f21f2d 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -81,14 +81,14 @@ raw_ostream *llvm::CreateInfoOutputFile() {
static TimerGroup *DefaultTimerGroup = 0;
static TimerGroup *getDefaultTimerGroup() {
TimerGroup *tmp = DefaultTimerGroup;
- sys::MemoryFence();
+ std::atomic_thread_fence(std::memory_order_seq_cst);
if (tmp) return tmp;
llvm_acquire_global_lock();
tmp = DefaultTimerGroup;
if (!tmp) {
tmp = new TimerGroup("Miscellaneous Ungrouped Timers");
- sys::MemoryFence();
+ std::atomic_thread_fence(std::memory_order_seq_cst);
DefaultTimerGroup = tmp;
}
llvm_release_global_lock();
OpenPOWER on IntegriCloud