[llvm] [SystemZ][z/OS] Fix build errors on z/OS in the Unix .inc files (PR #74758)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 12:37:30 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7030aab1d7a33c17d72eaf721c679be6ca0b073d d639111183e8bfa94d694101b75648a02ad44e1d -- llvm/lib/Support/Unix/Process.inc llvm/lib/Support/Unix/Program.inc
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc
index bf781eabf5..551f0d7f0f 100644
--- a/llvm/lib/Support/Unix/Process.inc
+++ b/llvm/lib/Support/Unix/Process.inc
@@ -62,7 +62,7 @@ getRUsageTimes() {
::getrusage(RUSAGE_SELF, &RU);
return {toDuration(RU.ru_utime), toDuration(RU.ru_stime)};
#else
-#ifndef __MVS__ // Exclude for MVS in case -pedantic is used
+#ifndef __MVS__ // Exclude for MVS in case -pedantic is used
#warning Cannot get usage times on this platform
#endif
return {std::chrono::microseconds::zero(), std::chrono::microseconds::zero()};
@@ -119,7 +119,7 @@ size_t Process::GetMallocUsage() {
return EndOfMemory - StartOfMemory;
return 0;
#else
-#ifndef __MVS__ // Exclude for MVS in case -pedantic is used
+#ifndef __MVS__ // Exclude for MVS in case -pedantic is used
#warning Cannot get malloc info on this platform
#endif
return 0;
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc
index f5881003a4..fcfeafb225 100644
--- a/llvm/lib/Support/Unix/Program.inc
+++ b/llvm/lib/Support/Unix/Program.inc
@@ -423,8 +423,7 @@ ProcessInfo llvm::sys::Wait(const ProcessInfo &PI,
#ifdef __MVS__
WaitResult.Pid = waitpid(ChildPid, &status, WaitPidOptions);
int GetrusageRC = getrusage(RUSAGE_CHILDREN, &Info);
- assert(!GetrusageRC &&
- "Must have valid measure of the resources!");
+ assert(!GetrusageRC && "Must have valid measure of the resources!");
#else
WaitResult.Pid = sys::wait4(ChildPid, &status, WaitPidOptions, &Info);
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/74758
More information about the llvm-commits
mailing list