From 6cfbd626806875214291d44ea4f9064cc1479623 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 29 Jan 2005 05:21:16 +0000 Subject: Memory used is a delta between memuse at the start of the time and the memuse at the end, thus it is signed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19904 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Timer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Support/Timer.cpp') diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index bea81648ef..3713f7f69c 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -19,7 +19,6 @@ #include #include #include - 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(); -- cgit v1.2.3