aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Unix/Program.inc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Unix/Program.inc')
-rw-r--r--llvm/lib/Support/Unix/Program.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc
index fb56fa4..d42681f 100644
--- a/llvm/lib/Support/Unix/Program.inc
+++ b/llvm/lib/Support/Unix/Program.inc
@@ -452,8 +452,12 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
if (ProcStat) {
std::chrono::microseconds UserT = toDuration(Info.ru_utime);
std::chrono::microseconds KernelT = toDuration(Info.ru_stime);
+#ifndef __HAIKU__
uint64_t PeakMemory = static_cast<uint64_t>(Info.ru_maxrss);
*ProcStat = ProcessStatistics{UserT + KernelT, UserT, PeakMemory};
+#else
+ *ProcStat = ProcessStatistics{UserT + KernelT, UserT, 0};
+#endif
}
// Return the proper exit status. Detect error conditions