Switched size_t to int64_t to prevent type mismatch in call to max.
authorLang Hames <lhames@gmail.com>
Tue, 23 Jun 2009 19:49:23 +0000 (19:49 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 23 Jun 2009 19:49:23 +0000 (19:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73988 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Timer.cpp

index 69f967c738978f139c058618517903e505efa4b4..8be9444dd3c72234c711571fa5e556bd0c54f09c 100644 (file)
@@ -182,11 +182,11 @@ void Timer::sum(const Timer &T) {
 /// currently active timers, which will be printed when the timer group prints
 ///
 void Timer::addPeakMemoryMeasurement() {
-  size_t MemUsed = getMemUsage();
+  int64_t MemUsed = getMemUsage();
 
   for (std::vector<Timer*>::iterator I = ActiveTimers->begin(),
          E = ActiveTimers->end(); I != E; ++I)
-    (*I)->PeakMem = std::max((*I)->PeakMem, MemUsed-(*I)->PeakMemBase);
+    (*I)->PeakMem = std::max((*I)->PeakMem, (int64_t)MemUsed-(*I)->PeakMemBase);
 }
 
 //===----------------------------------------------------------------------===//