[PATCH] D83661: [llvm][unittests] Fix LLVM-Unit :: Support/./SupportTests/ProgramEnvTest.TestExecuteAndWaitStatistics on Solaris

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 13:45:09 PDT 2020


ro marked 2 inline comments as done.
ro added inline comments.


================
Comment at: llvm/unittests/Support/ProgramTest.cpp:360
   ASSERT_TRUE(ProcStat);
-  ASSERT_GT(ProcStat->PeakMemory, 0U);
+  ASSERT_GE(ProcStat->PeakMemory, 0U);
   ASSERT_GE(ProcStat->UserTime, std::chrono::microseconds(0));
----------------
sepavloff wrote:
> `PeakMemory` is `uint64_t`, so the check condition is always true. It may cause compiler warnings.
> 
> I would propose to remove this check at all.
On Solaris (and the BSDs where `getrusage` originated), it's
`long` instead, thus no warning.

But I agree: the check is pretty pointless now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83661/new/

https://reviews.llvm.org/D83661





More information about the llvm-commits mailing list