[libc-commits] [libc] [libc] added quick_exit function (PR #93620)
via libc-commits
libc-commits at lists.llvm.org
Tue May 28 15:59:06 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 d9dec109375ded13d61da20877c399fb8fbb877d 9a9d89ef7b2022036cc39debb0899325ff9b153a -- libc/src/__support/OSUtil/exit.h libc/src/stdlib/quick_exit.cpp libc/test/src/stdlib/quick_exit_test.cpp libc/src/__support/libc_assert.h libc/src/stdlib/_Exit.cpp libc/src/stdlib/exit.cpp libc/src/unistd/_exit.cpp libc/test/IntegrationTest/test.h libc/src/__support/OSUtil/baremetal/exit.cpp libc/src/__support/OSUtil/gpu/exit.cpp libc/src/__support/OSUtil/linux/exit.cpp libc/src/stdlib/quick_exit.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/libc_assert.h b/libc/src/__support/libc_assert.h
index 00e15e9851..ed06cc3298 100644
--- a/libc/src/__support/libc_assert.h
+++ b/libc/src/__support/libc_assert.h
@@ -20,8 +20,8 @@
#else // Not LIBC_COPT_USE_C_ASSERT
-#include "src/__support/OSUtil/io.h"
#include "src/__support/OSUtil/exit.h"
+#include "src/__support/OSUtil/io.h"
#include "src/__support/integer_to_string.h"
#include "src/__support/macros/attributes.h" // For LIBC_INLINE
diff --git a/libc/src/stdlib/quick_exit.cpp b/libc/src/stdlib/quick_exit.cpp
index 68456869bc..b4084a2969 100644
--- a/libc/src/stdlib/quick_exit.cpp
+++ b/libc/src/stdlib/quick_exit.cpp
@@ -1,4 +1,5 @@
-//===-- Implementation of quick_exit --------------------------------------------===//
+//===-- Implementation of quick_exit
+//--------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/libc/src/stdlib/quick_exit.h b/libc/src/stdlib/quick_exit.h
index 8d86ec1e2b..38fbd46f52 100644
--- a/libc/src/stdlib/quick_exit.h
+++ b/libc/src/stdlib/quick_exit.h
@@ -1,4 +1,5 @@
-//===-- Implementation header for quick_exit --------------------------*- C++ -*-===//
+//===-- Implementation header for quick_exit --------------------------*- C++
+//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -18,4 +19,3 @@ namespace LIBC_NAMESPACE {
} // namespace LIBC_NAMESPACE
#endif // LLVM_LIBC_SRC_STDLIB_QUICK_EXIT_H
-
diff --git a/libc/test/IntegrationTest/test.h b/libc/test/IntegrationTest/test.h
index 0cda958ec5..5be66d9edf 100644
--- a/libc/test/IntegrationTest/test.h
+++ b/libc/test/IntegrationTest/test.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_UTILS_INTEGRATION_TEST_TEST_H
#define LLVM_LIBC_UTILS_INTEGRATION_TEST_TEST_H
-#include "src/__support/OSUtil/io.h"
#include "src/__support/OSUtil/exit.h"
+#include "src/__support/OSUtil/io.h"
#define __AS_STRING(val) #val
#define __CHECK_TRUE(file, line, val, should_exit) \
diff --git a/libc/test/src/stdlib/quick_exit_test.cpp b/libc/test/src/stdlib/quick_exit_test.cpp
index 1efd100aa6..59df57e294 100644
--- a/libc/test/src/stdlib/quick_exit_test.cpp
+++ b/libc/test/src/stdlib/quick_exit_test.cpp
@@ -1,4 +1,5 @@
-//===-- Unittests for quick_exit -----------------------------------------------===//
+//===-- Unittests for quick_exit
+//-----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#include "src/stdlib/quick_exit.h"
#include "src/stdlib/exit.h"
+#include "src/stdlib/quick_exit.h"
#include "test/UnitTest/Test.h"
TEST(LlvmLibcStdlib, quick_exit) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/93620
More information about the libc-commits
mailing list