[MCJIT] Allow '$' characters in symbol names in RuntimeDyldChecker.
[oota-llvm.git] / lib / Support / Timer.cpp
index c7427260bff7518ccbfd216637380fe2a0b0459f..210bda754e74957db524630e2b1c18830702a707 100644 (file)
@@ -18,6 +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"
@@ -84,7 +85,7 @@ static TimerGroup *getDefaultTimerGroup() {
   sys::MemoryFence();
   if (tmp) return tmp;
   
-  llvm::MutexGuard Lock(llvm::llvm_get_global_lock());
+  sys::SmartScopedLock<true> Lock(*TimerLock);
   tmp = DefaultTimerGroup;
   if (!tmp) {
     tmp = new TimerGroup("Miscellaneous Ungrouped Timers");