mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Users of the llvm global mutex must now acquire it manually.
This allows the mutex to be acquired in a guarded, RAII fashion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211066 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/Mutex.h"
|
||||
#include "llvm/support/MutexGuard.h"
|
||||
#include "llvm/Support/Process.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
@ -84,14 +84,13 @@ static TimerGroup *getDefaultTimerGroup() {
|
||||
sys::MemoryFence();
|
||||
if (tmp) return tmp;
|
||||
|
||||
llvm_acquire_global_lock();
|
||||
llvm::MutexGuard Lock(llvm::llvm_get_global_lock());
|
||||
tmp = DefaultTimerGroup;
|
||||
if (!tmp) {
|
||||
tmp = new TimerGroup("Miscellaneous Ungrouped Timers");
|
||||
sys::MemoryFence();
|
||||
DefaultTimerGroup = tmp;
|
||||
}
|
||||
llvm_release_global_lock();
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user