[llvm-commits] [llvm] r73988 - /llvm/trunk/lib/Support/Timer.cpp
Lang Hames
lhames at gmail.com
Tue Jun 23 12:49:24 PDT 2009
Author: lhames
Date: Tue Jun 23 14:49:23 2009
New Revision: 73988
URL: http://llvm.org/viewvc/llvm-project?rev=73988&view=rev
Log:
Switched size_t to int64_t to prevent type mismatch in call to max.
Modified:
llvm/trunk/lib/Support/Timer.cpp
Modified: llvm/trunk/lib/Support/Timer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Timer.cpp?rev=73988&r1=73987&r2=73988&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Timer.cpp (original)
+++ llvm/trunk/lib/Support/Timer.cpp Tue Jun 23 14:49:23 2009
@@ -182,11 +182,11 @@
/// 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);
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list