summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Timer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-29 05:21:16 +0000
committerChris Lattner <sabre@nondot.org>2005-01-29 05:21:16 +0000
commit2295d0b7deb9da2e8131e005e7da1c337bdaec3d (patch)
tree5caa820a248c0cb17590f110eb4cb2eacc103808 /llvm/lib/Support/Timer.cpp
parenta7f83cf6b3cf2b2de8f7b0c13795938835b802cb (diff)
downloadbcm5719-llvm-2295d0b7deb9da2e8131e005e7da1c337bdaec3d.tar.gz
bcm5719-llvm-2295d0b7deb9da2e8131e005e7da1c337bdaec3d.zip
Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed. llvm-svn: 19904
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r--llvm/lib/Support/Timer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index bea81648efc..3713f7f69ca 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -19,7 +19,6 @@
#include <functional>
#include <iostream>
#include <map>
-
using namespace llvm;
// GetLibSupportInfoOutputFile - Return a file stream to print our output on.
@@ -101,7 +100,7 @@ static inline size_t getMemUsage() {
struct TimeRecord {
double Elapsed, UserTime, SystemTime;
- size_t MemUsed;
+ ssize_t MemUsed;
};
static TimeRecord getTimeRecord(bool Start) {
@@ -111,7 +110,7 @@ static TimeRecord getTimeRecord(bool Start) {
sys::TimeValue user(0,0);
sys::TimeValue sys(0,0);
- size_t MemUsed = 0;
+ ssize_t MemUsed = 0;
if (Start) {
sys::Process::GetTimeUsage(now,user,sys);
MemUsed = getMemUsage();
OpenPOWER on IntegriCloud