#include "llvm/Support/Threading.h"
#include "llvm/Config/config.h"
+#include "llvm/Support/Atomic.h"
#include "llvm/Support/Mutex.h"
-#include <atomic>
#include <cassert>
using namespace llvm;
// We fence here to ensure that all initialization is complete BEFORE we
// return from llvm_start_multithreaded().
- std::atomic_thread_fence(std::memory_order_seq_cst);
+ sys::MemoryFence();
return true;
#else
return false;
// We fence here to insure that all threaded operations are complete BEFORE we
// return from llvm_stop_multithreaded().
- std::atomic_thread_fence(std::memory_order_seq_cst);
+ sys::MemoryFence();
multithreaded_mode = false;
delete global_lock;