[compiler-rt] [compiler-rt] Replace direct calls to pipe with internal_pipe (PR #97186)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 19:45:26 PDT 2024


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 0ce801f91cd79bd2f94469bdf4c48e82f2721ec1 cc6373b56a4654b21ca55dbb47c7b87a95235f31 -- compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cpp compiler-rt/lib/sanitizer_common/sanitizer_posix.h compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
index f11d681f2a..58d94a0748 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
@@ -213,9 +213,7 @@ uptr internal_unlink(const char *path) {
   return unlink(path);
 }
 
-uptr internal_pipe(fd_t fildes[2]) {
-  return pipe(fildes);
-}
+uptr internal_pipe(fd_t fildes[2]) { return pipe(fildes); }
 
 uptr internal_sched_yield() {
   return sched_yield();
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_posix.h
index c0a93eabda..e8acfe353d 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.h
@@ -58,7 +58,7 @@ uptr internal_lseek(fd_t fd, OFF_T offset, int whence);
 
 uptr internal_pipe(fd_t pipefd[2]);
 
-#if SANITIZER_NETBSD
+#  if SANITIZER_NETBSD
 uptr internal_ptrace(int request, int pid, void *addr, int data);
 #else
 uptr internal_ptrace(int request, int pid, void *addr, void *data);

``````````

</details>


https://github.com/llvm/llvm-project/pull/97186


More information about the llvm-commits mailing list