[libc-commits] [libc] [libc] Add osutils for Windows and make libc and its tests build on Windows target (PR #104676)

via libc-commits libc-commits at lists.llvm.org
Sat Aug 17 09:42:17 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 76161451f5ca837b25769c7d142f8271b45d9b28 8f550ff32701ce1ffd6fcccb50689a1eaab118de --extensions cpp,h -- libc/src/__support/OSUtil/windows/exit.cpp libc/src/__support/OSUtil/windows/io.cpp libc/src/__support/OSUtil/windows/io.h libc/include/llvm-libc-macros/float16-macros.h libc/include/llvm-libc-macros/stdckdint-macros.h libc/src/__support/CPP/new.cpp libc/src/__support/CPP/new.h libc/src/__support/OSUtil/io.h libc/src/__support/macros/properties/types.h libc/test/src/__support/FPUtil/fpbits_test.cpp libc/test/src/__support/arg_list_test.cpp libc/test/src/fenv/getenv_and_setenv_test.cpp libc/test/src/math/smoke/AddTest.h libc/test/src/math/smoke/SubTest.h libc/test/src/string/memory_utils/op_tests.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/src/__support/OSUtil/windows/exit.cpp b/libc/src/__support/OSUtil/windows/exit.cpp
index 07b776ce1c..a67673b85f 100644
--- a/libc/src/__support/OSUtil/windows/exit.cpp
+++ b/libc/src/__support/OSUtil/windows/exit.cpp
@@ -13,9 +13,7 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace internal {
 
-__attribute__((noreturn)) void exit(int status) {
-  ExitProcess(status);
-}
+__attribute__((noreturn)) void exit(int status) { ExitProcess(status); }
 
 } // namespace internal
 } // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/__support/OSUtil/windows/io.cpp b/libc/src/__support/OSUtil/windows/io.cpp
index c71f296f61..654a39c694 100644
--- a/libc/src/__support/OSUtil/windows/io.cpp
+++ b/libc/src/__support/OSUtil/windows/io.cpp
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "src/__support/macros/config.h"
 #include "io.h"
+#include "src/__support/macros/config.h"
 
 #include <Windows.h>
 

``````````

</details>


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


More information about the libc-commits mailing list