[libc-commits] [libc] [libc] remove errno.h includes (PR #110934)
via libc-commits
libc-commits at lists.llvm.org
Wed Oct 2 15:24:59 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Job Henandez Lara (Jobhdez)
<details>
<summary>Changes</summary>
---
Patch is 52.25 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/110934.diff
124 Files Affected:
- (modified) libc/src/__support/StringUtil/tables/CMakeLists.txt (+1)
- (modified) libc/src/__support/StringUtil/tables/linux_extension_errors.h (+1-1)
- (modified) libc/src/__support/StringUtil/tables/posix_errors.h (-1)
- (modified) libc/src/__support/StringUtil/tables/stdc_errors.h (-1)
- (modified) libc/src/errno/libc_errno.h (-2)
- (modified) libc/src/math/generic/acosf.cpp (-1)
- (modified) libc/src/math/generic/asinf.cpp (-1)
- (modified) libc/src/math/generic/cosf.cpp (-1)
- (modified) libc/src/math/generic/exp.cpp (-1)
- (modified) libc/src/math/generic/exp10.cpp (-1)
- (modified) libc/src/math/generic/exp10f_impl.h (-1)
- (modified) libc/src/math/generic/exp2.cpp (-1)
- (modified) libc/src/math/generic/exp2f_impl.h (-1)
- (modified) libc/src/math/generic/expf.cpp (-1)
- (modified) libc/src/math/generic/explogxf.h (-1)
- (modified) libc/src/math/generic/expm1f.cpp (-1)
- (modified) libc/src/math/generic/powf.cpp (-1)
- (modified) libc/src/math/generic/sincosf.cpp (-1)
- (modified) libc/src/math/generic/sinf.cpp (-1)
- (modified) libc/src/math/generic/tanf.cpp (-1)
- (modified) libc/src/pthread/pthread_atfork.cpp (-1)
- (modified) libc/src/pthread/pthread_attr_setdetachstate.cpp (-1)
- (modified) libc/src/pthread/pthread_attr_setguardsize.cpp (-1)
- (modified) libc/src/pthread/pthread_attr_setstack.cpp (-1)
- (modified) libc/src/pthread/pthread_attr_setstacksize.cpp (-1)
- (modified) libc/src/pthread/pthread_condattr_setclock.cpp (-1)
- (modified) libc/src/pthread/pthread_condattr_setpshared.cpp (-1)
- (modified) libc/src/pthread/pthread_create.cpp (-1)
- (modified) libc/src/pthread/pthread_key_create.cpp (-1)
- (modified) libc/src/pthread/pthread_key_delete.cpp (-1)
- (modified) libc/src/pthread/pthread_mutex_init.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_destroy.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_getpshared.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_getrobust.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_gettype.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_setpshared.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_setrobust.cpp (-1)
- (modified) libc/src/pthread/pthread_mutexattr_settype.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_destroy.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_init.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_rdlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_timedrdlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_timedwrlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_tryrdlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_trywrlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_unlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlock_wrlock.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlockattr_setkind_np.cpp (-1)
- (modified) libc/src/pthread/pthread_rwlockattr_setpshared.cpp (-1)
- (modified) libc/src/pthread/pthread_setspecific.cpp (-1)
- (modified) libc/src/spawn/posix_spawn_file_actions_addclose.cpp (-1)
- (modified) libc/src/spawn/posix_spawn_file_actions_adddup2.cpp (-1)
- (modified) libc/src/spawn/posix_spawn_file_actions_addopen.cpp (-1)
- (modified) libc/src/spawn/posix_spawn_file_actions_destroy.cpp (-1)
- (modified) libc/src/threads/thrd_create.cpp (-1)
- (modified) libc/test/UnitTest/PrintfMatcher.h (-1)
- (modified) libc/test/UnitTest/ScanfMatcher.h (-1)
- (modified) libc/test/integration/src/pthread/pthread_name_test.cpp (-1)
- (modified) libc/test/integration/src/spawn/posix_spawn_test_binary.cpp (-1)
- (modified) libc/test/integration/src/unistd/fork_test.cpp (-1)
- (modified) libc/test/integration/src/unistd/stack_smashing_test.cpp (-1)
- (modified) libc/test/integration/startup/linux/tls_test.cpp (-1)
- (modified) libc/test/src/math/RoundToIntegerTest.h (-1)
- (modified) libc/test/src/math/acosf_test.cpp (-1)
- (modified) libc/test/src/math/acoshf_test.cpp (-1)
- (modified) libc/test/src/math/asinf_test.cpp (-1)
- (modified) libc/test/src/math/asinhf_test.cpp (-1)
- (modified) libc/test/src/math/atanf_test.cpp (-1)
- (modified) libc/test/src/math/atanhf_test.cpp (-1)
- (modified) libc/test/src/math/cosf_test.cpp (-1)
- (modified) libc/test/src/math/coshf_test.cpp (-1)
- (modified) libc/test/src/math/erff_test.cpp (-1)
- (modified) libc/test/src/math/exp10_test.cpp (-1)
- (modified) libc/test/src/math/exp2_test.cpp (-1)
- (modified) libc/test/src/math/exp_test.cpp (-1)
- (modified) libc/test/src/math/log10_test.cpp (-1)
- (modified) libc/test/src/math/log10f_test.cpp (-1)
- (modified) libc/test/src/math/log1p_test.cpp (-1)
- (modified) libc/test/src/math/log1pf_test.cpp (-1)
- (modified) libc/test/src/math/log2_test.cpp (-1)
- (modified) libc/test/src/math/log_test.cpp (-1)
- (modified) libc/test/src/math/powf_test.cpp (-1)
- (modified) libc/test/src/math/sincosf_test.cpp (-1)
- (modified) libc/test/src/math/sinf_test.cpp (-1)
- (modified) libc/test/src/math/sinhf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/RoundToIntegerTest.h (-1)
- (modified) libc/test/src/math/smoke/acosf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/acoshf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/asinf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/asinhf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/atanf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/atanhf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/cosf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/coshf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/erff_test.cpp (-1)
- (modified) libc/test/src/math/smoke/exp10_test.cpp (-1)
- (modified) libc/test/src/math/smoke/exp2_test.cpp (-1)
- (modified) libc/test/src/math/smoke/exp_test.cpp (-1)
- (modified) libc/test/src/math/smoke/expm1_test.cpp (-1)
- (modified) libc/test/src/math/smoke/log10_test.cpp (-1)
- (modified) libc/test/src/math/smoke/log10f_test.cpp (-1)
- (modified) libc/test/src/math/smoke/log1p_test.cpp (-1)
- (modified) libc/test/src/math/smoke/log1pf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/log2_test.cpp (-1)
- (modified) libc/test/src/math/smoke/log_test.cpp (-1)
- (modified) libc/test/src/math/smoke/powf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/sincosf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/sinf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/sinhf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/tanf_test.cpp (-1)
- (modified) libc/test/src/math/smoke/tanhf_test.cpp (-1)
- (modified) libc/test/src/math/tanf_test.cpp (-1)
- (modified) libc/test/src/math/tanhf_test.cpp (-1)
- (modified) libc/test/src/pthread/pthread_attr_test.cpp (-1)
- (modified) libc/test/src/pthread/pthread_mutexattr_test.cpp (-1)
- (modified) libc/test/src/signal/sigaddset_test.cpp (-1)
- (modified) libc/test/src/signal/sigdelset_test.cpp (-1)
- (modified) libc/test/src/signal/sigfillset_test.cpp (-1)
- (modified) libc/test/src/spawn/posix_spawn_file_actions_test.cpp (-1)
- (modified) libc/test/src/sys/prctl/linux/prctl_test.cpp (-1)
- (modified) libc/test/src/sys/select/select_failure_test.cpp (-1)
- (modified) libc/test/src/sys/utsname/uname_test.cpp (-1)
- (modified) libc/test/src/sys/wait/wait4_test.cpp (-1)
- (modified) libc/test/src/sys/wait/waitpid_test.cpp (-1)
``````````diff
diff --git a/libc/src/__support/StringUtil/tables/CMakeLists.txt b/libc/src/__support/StringUtil/tables/CMakeLists.txt
index b7bb33ee0a0fe2..fffe93592f01d2 100644
--- a/libc/src/__support/StringUtil/tables/CMakeLists.txt
+++ b/libc/src/__support/StringUtil/tables/CMakeLists.txt
@@ -23,6 +23,7 @@ add_header_library(
DEPENDS
libc.include.errno
libc.src.__support.StringUtil.message_mapper
+ libc.src.errno.libc_errno
)
add_header_library(
diff --git a/libc/src/__support/StringUtil/tables/linux_extension_errors.h b/libc/src/__support/StringUtil/tables/linux_extension_errors.h
index f6e8dea154d3be..02ac3c011b1e3a 100644
--- a/libc/src/__support/StringUtil/tables/linux_extension_errors.h
+++ b/libc/src/__support/StringUtil/tables/linux_extension_errors.h
@@ -11,8 +11,8 @@
#include "src/__support/StringUtil/message_mapper.h"
#include "src/__support/macros/config.h"
+#include "src/errno/libc_errno.h"
-#include <errno.h> // For error macros
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/StringUtil/tables/posix_errors.h b/libc/src/__support/StringUtil/tables/posix_errors.h
index 5294f85eb8d24e..65390ceade9f3b 100644
--- a/libc/src/__support/StringUtil/tables/posix_errors.h
+++ b/libc/src/__support/StringUtil/tables/posix_errors.h
@@ -12,7 +12,6 @@
#include "src/__support/StringUtil/message_mapper.h"
#include "src/__support/macros/config.h"
-#include <errno.h> // For error macros
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/StringUtil/tables/stdc_errors.h b/libc/src/__support/StringUtil/tables/stdc_errors.h
index 1f0beef82001cd..f4f981785c9e1d 100644
--- a/libc/src/__support/StringUtil/tables/stdc_errors.h
+++ b/libc/src/__support/StringUtil/tables/stdc_errors.h
@@ -12,7 +12,6 @@
#include "src/__support/StringUtil/message_mapper.h"
#include "src/__support/macros/config.h"
-#include <errno.h> // For error macros
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/errno/libc_errno.h b/libc/src/errno/libc_errno.h
index 44ee2714843bab..49c9146b28c606 100644
--- a/libc/src/errno/libc_errno.h
+++ b/libc/src/errno/libc_errno.h
@@ -21,13 +21,11 @@
// Unit and hermetic tests should:
// - #include "src/errno/libc_errno.h"
-// - NOT #include <errno.h>
// - Only use `libc_errno` in the code
// - Depend on libc.src.errno.errno
// Integration tests should:
// - NOT #include "src/errno/libc_errno.h"
-// - #include <errno.h>
// - Use regular `errno` in the code
// - Still depend on libc.src.errno.errno
diff --git a/libc/src/math/generic/acosf.cpp b/libc/src/math/generic/acosf.cpp
index 95d8bc0213cba7..cf9721f8c425a3 100644
--- a/libc/src/math/generic/acosf.cpp
+++ b/libc/src/math/generic/acosf.cpp
@@ -16,7 +16,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <errno.h>
#include "inv_trigf_utils.h"
diff --git a/libc/src/math/generic/asinf.cpp b/libc/src/math/generic/asinf.cpp
index d6acc3a1692bc4..f92f6368b0aa95 100644
--- a/libc/src/math/generic/asinf.cpp
+++ b/libc/src/math/generic/asinf.cpp
@@ -17,7 +17,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
-#include <errno.h>
#include "inv_trigf_utils.h"
diff --git a/libc/src/math/generic/cosf.cpp b/libc/src/math/generic/cosf.cpp
index 6a59b3763b6e87..18e019ae7c4595 100644
--- a/libc/src/math/generic/cosf.cpp
+++ b/libc/src/math/generic/cosf.cpp
@@ -18,7 +18,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/exp.cpp b/libc/src/math/generic/exp.cpp
index df0c2eab7155c6..0b56770c0c3e22 100644
--- a/libc/src/math/generic/exp.cpp
+++ b/libc/src/math/generic/exp.cpp
@@ -25,7 +25,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/exp10.cpp b/libc/src/math/generic/exp10.cpp
index d01bbd8fc01c32..68d9608b379785 100644
--- a/libc/src/math/generic/exp10.cpp
+++ b/libc/src/math/generic/exp10.cpp
@@ -25,7 +25,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/exp10f_impl.h b/libc/src/math/generic/exp10f_impl.h
index fe2195c6e04739..2bdd4cd465c0ef 100644
--- a/libc/src/math/generic/exp10f_impl.h
+++ b/libc/src/math/generic/exp10f_impl.h
@@ -21,7 +21,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
namespace generic {
diff --git a/libc/src/math/generic/exp2.cpp b/libc/src/math/generic/exp2.cpp
index fbabb625af51fa..42625360284f99 100644
--- a/libc/src/math/generic/exp2.cpp
+++ b/libc/src/math/generic/exp2.cpp
@@ -25,7 +25,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/exp2f_impl.h b/libc/src/math/generic/exp2f_impl.h
index 3f1c5ee68f081e..41751c7424ca85 100644
--- a/libc/src/math/generic/exp2f_impl.h
+++ b/libc/src/math/generic/exp2f_impl.h
@@ -21,7 +21,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h"
-#include <errno.h>
#include "explogxf.h"
diff --git a/libc/src/math/generic/expf.cpp b/libc/src/math/generic/expf.cpp
index 1d7c0478eb2250..51462d59289a64 100644
--- a/libc/src/math/generic/expf.cpp
+++ b/libc/src/math/generic/expf.cpp
@@ -19,7 +19,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/explogxf.h b/libc/src/math/generic/explogxf.h
index 7daed558f74b1e..88287c703db730 100644
--- a/libc/src/math/generic/explogxf.h
+++ b/libc/src/math/generic/explogxf.h
@@ -20,7 +20,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/cpu_features.h"
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/expm1f.cpp b/libc/src/math/generic/expm1f.cpp
index b1a0fe16de0771..47dd515456a605 100644
--- a/libc/src/math/generic/expm1f.cpp
+++ b/libc/src/math/generic/expm1f.cpp
@@ -21,7 +21,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/powf.cpp b/libc/src/math/generic/powf.cpp
index e3dee678a1a70a..f13c710e78e112 100644
--- a/libc/src/math/generic/powf.cpp
+++ b/libc/src/math/generic/powf.cpp
@@ -25,7 +25,6 @@
#include "exp10f_impl.h" // Speedup for powf(10, y) = exp10f(y)
#include "exp2f_impl.h" // Speedup for powf(2, y) = exp2f(y)
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/sincosf.cpp b/libc/src/math/generic/sincosf.cpp
index 3bf8e9772231d6..449281293d2ae3 100644
--- a/libc/src/math/generic/sincosf.cpp
+++ b/libc/src/math/generic/sincosf.cpp
@@ -17,7 +17,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/math/generic/sinf.cpp b/libc/src/math/generic/sinf.cpp
index 43c2c2a8d883d2..62015070b29054 100644
--- a/libc/src/math/generic/sinf.cpp
+++ b/libc/src/math/generic/sinf.cpp
@@ -19,7 +19,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
-#include <errno.h>
#if defined(LIBC_TARGET_CPU_HAS_FMA)
#include "range_reduction_fma.h"
diff --git a/libc/src/math/generic/tanf.cpp b/libc/src/math/generic/tanf.cpp
index 01d8c9855d461b..105518336f8e76 100644
--- a/libc/src/math/generic/tanf.cpp
+++ b/libc/src/math/generic/tanf.cpp
@@ -19,7 +19,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_atfork.cpp b/libc/src/pthread/pthread_atfork.cpp
index d3f3c259992ec2..62846c27a83195 100644
--- a/libc/src/pthread/pthread_atfork.cpp
+++ b/libc/src/pthread/pthread_atfork.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/fork_callbacks.h"
-#include <errno.h>
#include <pthread.h> // For pthread_* type definitions.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_attr_setdetachstate.cpp b/libc/src/pthread/pthread_attr_setdetachstate.cpp
index 3aa72d217f28b3..a413abdb70af2a 100644
--- a/libc/src/pthread/pthread_attr_setdetachstate.cpp
+++ b/libc/src/pthread/pthread_attr_setdetachstate.cpp
@@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_attr_setguardsize.cpp b/libc/src/pthread/pthread_attr_setguardsize.cpp
index 389ee773fc5db5..8fb62bef422302 100644
--- a/libc/src/pthread/pthread_attr_setguardsize.cpp
+++ b/libc/src/pthread/pthread_attr_setguardsize.cpp
@@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
#include <linux/param.h> // For EXEC_PAGESIZE.
#include <pthread.h>
diff --git a/libc/src/pthread/pthread_attr_setstack.cpp b/libc/src/pthread/pthread_attr_setstack.cpp
index f4f2d1450633ea..361591d87a0f0d 100644
--- a/libc/src/pthread/pthread_attr_setstack.cpp
+++ b/libc/src/pthread/pthread_attr_setstack.cpp
@@ -13,7 +13,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h" // For STACK_ALIGNMENT
-#include <errno.h>
#include <pthread.h>
#include <stdint.h>
diff --git a/libc/src/pthread/pthread_attr_setstacksize.cpp b/libc/src/pthread/pthread_attr_setstacksize.cpp
index f327d3365b5d85..59f5921daf4e50 100644
--- a/libc/src/pthread/pthread_attr_setstacksize.cpp
+++ b/libc/src/pthread/pthread_attr_setstacksize.cpp
@@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_condattr_setclock.cpp b/libc/src/pthread/pthread_condattr_setclock.cpp
index 5c0144523f93e6..8422b19fd5e7b5 100644
--- a/libc/src/pthread/pthread_condattr_setclock.cpp
+++ b/libc/src/pthread/pthread_condattr_setclock.cpp
@@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h> // EINVAL
#include <pthread.h> // pthread_condattr_t
#include <sys/types.h> // clockid_t
#include <time.h> // CLOCK_MONOTONIC, CLOCK_REALTIME
diff --git a/libc/src/pthread/pthread_condattr_setpshared.cpp b/libc/src/pthread/pthread_condattr_setpshared.cpp
index 536aeadac5d446..29f8ee95b590c5 100644
--- a/libc/src/pthread/pthread_condattr_setpshared.cpp
+++ b/libc/src/pthread/pthread_condattr_setpshared.cpp
@@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h> // EINVAL
#include <pthread.h> // pthread_condattr_t, PTHREAD_PROCESS_SHARED, PTHREAD_PROCESS_PRIVATE
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_create.cpp b/libc/src/pthread/pthread_create.cpp
index 1fb4b50109401c..5f829d13034964 100644
--- a/libc/src/pthread/pthread_create.cpp
+++ b/libc/src/pthread/pthread_create.cpp
@@ -20,7 +20,6 @@
#include "src/__support/macros/optimization.h"
#include "src/__support/threads/thread.h"
-#include <errno.h>
#include <pthread.h> // For pthread_* type definitions.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_key_create.cpp b/libc/src/pthread/pthread_key_create.cpp
index 0583baca22f4d4..f02fbdc782e778 100644
--- a/libc/src/pthread/pthread_key_create.cpp
+++ b/libc/src/pthread/pthread_key_create.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_key_delete.cpp b/libc/src/pthread/pthread_key_delete.cpp
index 20484fa9bdf828..e77ebb99189d9c 100644
--- a/libc/src/pthread/pthread_key_delete.cpp
+++ b/libc/src/pthread/pthread_key_delete.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutex_init.cpp b/libc/src/pthread/pthread_mutex_init.cpp
index 0281f732473d9d..94052e53d8c0ab 100644
--- a/libc/src/pthread/pthread_mutex_init.cpp
+++ b/libc/src/pthread/pthread_mutex_init.cpp
@@ -13,7 +13,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/mutex.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_destroy.cpp b/libc/src/pthread/pthread_mutexattr_destroy.cpp
index 3b2551afd11b55..4daf84d7cc0d89 100644
--- a/libc/src/pthread/pthread_mutexattr_destroy.cpp
+++ b/libc/src/pthread/pthread_mutexattr_destroy.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_getpshared.cpp b/libc/src/pthread/pthread_mutexattr_getpshared.cpp
index 2d83a5229e9ecd..142eb9fd3b4526 100644
--- a/libc/src/pthread/pthread_mutexattr_getpshared.cpp
+++ b/libc/src/pthread/pthread_mutexattr_getpshared.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_getrobust.cpp b/libc/src/pthread/pthread_mutexattr_getrobust.cpp
index 508b502a580087..9ce46833ecbf5f 100644
--- a/libc/src/pthread/pthread_mutexattr_getrobust.cpp
+++ b/libc/src/pthread/pthread_mutexattr_getrobust.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_gettype.cpp b/libc/src/pthread/pthread_mutexattr_gettype.cpp
index 3747bf5ce73e94..6ba3256b35f805 100644
--- a/libc/src/pthread/pthread_mutexattr_gettype.cpp
+++ b/libc/src/pthread/pthread_mutexattr_gettype.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_setpshared.cpp b/libc/src/pthread/pthread_mutexattr_setpshared.cpp
index b290de764c91b6..e1223750ec591a 100644
--- a/libc/src/pthread/pthread_mutexattr_setpshared.cpp
+++ b/libc/src/pthread/pthread_mutexattr_setpshared.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_setrobust.cpp b/libc/src/pthread/pthread_mutexattr_setrobust.cpp
index e572827486c077..e1327e9ef1e028 100644
--- a/libc/src/pthread/pthread_mutexattr_setrobust.cpp
+++ b/libc/src/pthread/pthread_mutexattr_setrobust.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_mutexattr_settype.cpp b/libc/src/pthread/pthread_mutexattr_settype.cpp
index 27e8ff859ba347..e23b52736bfc5e 100644
--- a/libc/src/pthread/pthread_mutexattr_settype.cpp
+++ b/libc/src/pthread/pthread_mutexattr_settype.cpp
@@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_destroy.cpp b/libc/src/pthread/pthread_rwlock_destroy.cpp
index 345076aae43488..afc5622e54a003 100644
--- a/libc/src/pthread/pthread_rwlock_destroy.cpp
+++ b/libc/src/pthread/pthread_rwlock_destroy.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_init.cpp b/libc/src/pthread/pthread_rwlock_init.cpp
index d1a31625d0dabd..dc5424cbc4838d 100644
--- a/libc/src/pthread/pthread_rwlock_init.cpp
+++ b/libc/src/pthread/pthread_rwlock_init.cpp
@@ -14,7 +14,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_rdlock.cpp b/libc/src/pthread/pthread_rwlock_rdlock.cpp
index 16d82301c54a9a..7dee8eb9a44b12 100644
--- a/libc/src/pthread/pthread_rwlock_rdlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_rdlock.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_timedrdlock.cpp b/libc/src/pthread/pthread_rwlock_timedrdlock.cpp
index 905541014a4a46..710fb48e49573e 100644
--- a/libc/src/pthread/pthread_rwlock_timedrdlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_timedrdlock.cpp
@@ -15,7 +15,6 @@
#include "src/__support/threads/linux/rwlock.h"
#include "src/__support/time/linux/abs_timeout.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_timedwrlock.cpp b/libc/src/pthread/pthread_rwlock_timedwrlock.cpp
index f77ac40f22b897..d2dc70e992e82e 100644
--- a/libc/src/pthread/pthread_rwlock_timedwrlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_timedwrlock.cpp
@@ -15,7 +15,6 @@
#include "src/__support/threads/linux/rwlock.h"
#include "src/__support/time/linux/abs_timeout.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_tryrdlock.cpp b/libc/src/pthread/pthread_rwlock_tryrdlock.cpp
index da59a576b82747..d54b57f0560908 100644
--- a/libc/src/pthread/pthread_rwlock_tryrdlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_tryrdlock.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_trywrlock.cpp b/libc/src/pthread/pthread_rwlock_trywrlock.cpp
index ccd1bd49c402c6..0ebf1cb334cd07 100644
--- a/libc/src/pthread/pthread_rwlock_trywrlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_trywrlock.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_unlock.cpp b/libc/src/pthread/pthread_rwlock_unlock.cpp
index 77c50a8e65fdfb..c5713922e1273a 100644
--- a/libc/src/pthread/pthread_rwlock_unlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_unlock.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#include <errno.h>
#include <pthread.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/pthread/pthread_rwlock_wrlock.cpp b/libc/src/pthread/pthread_rwlock_wrlock.cpp
index c2561c81f4bd0e..f02fb6b5db9c09 100644
--- a/libc/src/pthread/pthread_rwlock_wrlock.cpp
+++ b/libc/src/pthread/pthread_rwlock_wrlock.cpp
@@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"
-#i...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/110934
More information about the libc-commits
mailing list