From a9d1f2c559ef4b2549e29288fe6944e68913ba0f Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 7 Jul 2009 18:33:04 +0000 Subject: Have scoped mutexes take referenes instead of pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Timer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/Support/Timer.cpp') diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index ede1dc96e8..8eef2bd48d 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -145,7 +145,7 @@ static TimeRecord getTimeRecord(bool Start) { static ManagedStatic > ActiveTimers; void Timer::startTimer() { - sys::SmartScopedLock L(&Lock); + sys::SmartScopedLock L(Lock); Started = true; ActiveTimers->push_back(this); TimeRecord TR = getTimeRecord(true); @@ -157,7 +157,7 @@ void Timer::startTimer() { } void Timer::stopTimer() { - sys::SmartScopedLock L(&Lock); + sys::SmartScopedLock L(Lock); TimeRecord TR = getTimeRecord(false); Elapsed += TR.Elapsed; UserTime += TR.UserTime; @@ -229,7 +229,7 @@ static ManagedStatic NamedTimers; static ManagedStatic NamedGroupedTimers; static Timer &getNamedRegionTimer(const std::string &Name) { - sys::SmartScopedLock L(&*TimerLock); + sys::SmartScopedLock L(*TimerLock); Name2Timer::iterator I = NamedTimers->find(Name); if (I != NamedTimers->end()) return I->second; @@ -239,7 +239,7 @@ static Timer &getNamedRegionTimer(const std::string &Name) { static Timer &getNamedRegionTimer(const std::string &Name, const std::string &GroupName) { - sys::SmartScopedLock L(&*TimerLock); + sys::SmartScopedLock L(*TimerLock); Name2Pair::iterator I = NamedGroupedTimers->find(GroupName); if (I == NamedGroupedTimers->end()) { @@ -365,7 +365,7 @@ llvm::GetLibSupportInfoOutputFile() { void TimerGroup::removeTimer() { - sys::SmartScopedLock L(&*TimerLock); + sys::SmartScopedLock L(*TimerLock); if (--NumTimers == 0 && !TimersToPrint.empty()) { // Print timing report... // Sort the timers in descending order by amount of time taken... std::sort(TimersToPrint.begin(), TimersToPrint.end(), @@ -434,12 +434,12 @@ void TimerGroup::removeTimer() { } void TimerGroup::addTimer() { - sys::SmartScopedLock L(&*TimerLock); + sys::SmartScopedLock L(*TimerLock); ++NumTimers; } void TimerGroup::addTimerToPrint(const Timer &T) { - sys::SmartScopedLock L(&*TimerLock); + sys::SmartScopedLock L(*TimerLock); TimersToPrint.push_back(Timer(true, T)); } -- cgit v1.2.3-18-g5258