summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Support/Timer.cpp2
-rw-r--r--llvm/support/lib/Support/Timer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index 8023c500e5d..3a81fc4b53f 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -89,7 +89,7 @@ struct TimeRecord {
static TimeRecord getTimeRecord(bool Start) {
struct rusage RU;
struct timeval T;
- long MemUsed;
+ long MemUsed = 0;
if (Start) {
MemUsed = getMemUsage();
if (getrusage(RUSAGE_SELF, &RU))
diff --git a/llvm/support/lib/Support/Timer.cpp b/llvm/support/lib/Support/Timer.cpp
index 8023c500e5d..3a81fc4b53f 100644
--- a/llvm/support/lib/Support/Timer.cpp
+++ b/llvm/support/lib/Support/Timer.cpp
@@ -89,7 +89,7 @@ struct TimeRecord {
static TimeRecord getTimeRecord(bool Start) {
struct rusage RU;
struct timeval T;
- long MemUsed;
+ long MemUsed = 0;
if (Start) {
MemUsed = getMemUsage();
if (getrusage(RUSAGE_SELF, &RU))
OpenPOWER on IntegriCloud