[libc-commits] [libc] [libc][OSUtil] refactor quick_exit to be an object library everywhere (PR #85955)

via libc-commits libc-commits at lists.llvm.org
Wed Mar 20 09:16:47 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 c63a291c64852a086cb447c7078e5312aac1a05c 04083c8dd899d822790c405d3b7ed1ab574ae54b -- libc/src/__support/OSUtil/gpu/quick_exit.cpp libc/src/__support/OSUtil/quick_exit.h libc/src/stdlib/_Exit.cpp libc/src/stdlib/exit.cpp libc/src/__support/OSUtil/linux/quick_exit.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/src/__support/OSUtil/linux/quick_exit.cpp b/libc/src/__support/OSUtil/linux/quick_exit.cpp
index bb83c5f0c2..51b3231d38 100644
--- a/libc/src/__support/OSUtil/linux/quick_exit.cpp
+++ b/libc/src/__support/OSUtil/linux/quick_exit.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/__support/common.h"
-#include "syscall.h" // For internal syscall function.
+#include "syscall.h"     // For internal syscall function.
 #include <sys/syscall.h> // For syscall numbers.
 
 namespace LIBC_NAMESPACE {
@@ -17,8 +17,8 @@ namespace LIBC_NAMESPACE {
 #ifdef LIBC_TARGET_ARCH_IS_X86
 __attribute__((no_stack_protector))
 #endif
-__attribute__((noreturn))
-void quick_exit(int status) {
+__attribute__((noreturn)) void
+quick_exit(int status) {
   for (;;) {
     LIBC_NAMESPACE::syscall_impl<long>(SYS_exit_group, status);
     LIBC_NAMESPACE::syscall_impl<long>(SYS_exit, status);

``````````

</details>


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


More information about the libc-commits mailing list