-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[libc] remove errno.h includes #110934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc] remove errno.h includes #110934
Conversation
@llvm/pr-subscribers-libc Author: Job Henandez Lara (Jobhdez) ChangesPatch is 52.25 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/110934.diff 124 Files Affected:
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]
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start to the cleanup, but this patch fails to build in fullbuild mode due to some of these files still needing errno macros.
libc/src/errno/libc_errno.h
Outdated
@@ -21,13 +21,11 @@ | |||
|
|||
// Unit and hermetic tests should: | |||
// - #include "src/errno/libc_errno.h" | |||
// - NOT #include <errno.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these comments should probably stay.
@@ -12,7 +12,6 @@ | |||
#include "src/__support/StringUtil/message_mapper.h" | |||
#include "src/__support/macros/config.h" | |||
|
|||
#include <errno.h> // For error macros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other error table files also need to include libc_errno.h
. Also it seems like we don't have a complete list of errno macros in our include files so those will need to be updated before we can remove the public errno includes from these files.
I see. I only built in overlay mode. I'll address your review. Thanks! |
* commit 'FETCH_HEAD': [X86] combineAndLoadToBZHI - don't do an return early return if we fail to match a load [X86] replace-load-and-with-bzhi.ll - add commuted test cases to show failure to fold [X86] replace-load-and-with-bzhi.ll - cleanup check-prefixes to use X86/X64 for 32/64-bit targets [ExecutionEngine] Avoid repeated hash lookups (NFC) (llvm#111275) [ByteCode] Avoid repeated hash lookups (NFC) (llvm#111273) [StaticAnalyzer] Avoid repeated hash lookups (NFC) (llvm#111272) [CodeGen] Avoid repeated hash lookups (NFC) (llvm#111274) [RISCV] Simplify fixed-vector-fp.ll run lines. NFC [libc++][format][1/3] Adds more benchmarks. (llvm#101803) [X86] combineOrXorWithSETCC - avoid duplicate SDLoc/operands code. NFC. [X86] convertIntLogicToFPLogic - avoid duplicate SDLoc/operands code. NFC. [libc] Clean up some include in `libc`. (llvm#110980) [X86] combineBitOpWithPACK - avoid duplicate SDLoc/operands code. NFC. [X86] combineBitOpWithMOVMSK - avoid duplicate SDLoc/operands code. NFC. [X86] combineBitOpWithShift - avoid duplicate SDLoc/operands code. NFC. [x86] combineMul - use computeKnownBits directly to find MUL_IMM constant splat. [X86] combineSubABS - avoid duplicate SDLoc. NFC. [ValueTypes][RISCV] Add v1bf16 type (llvm#111112) [VPlan] Add additional FOR hoisting test. [clang-tidy] Create bugprone-bitwise-pointer-cast check (llvm#108083) [InstCombine] Canonicalize more geps with constant gep bases and constant offsets. (llvm#110033) [LV] Honor uniform-after-vectorization in setVectorizedCallDecision. [ELF] Pass Ctx & to Arch/ [ELF] Pass Ctx & to Arch/ [libc++] Fix a typo (llvm#111239) [X86] For minsize memset/memcpy, use byte or double-word accesses (llvm#87003) [RISCV] Unify RVBShift_ri and RVBShiftW_ri with Shift_ri and ShiftW_ri. NFC (llvm#111263) Revert "Reapply "[AMDGPU][GlobalISel] Fix load/store of pointer vectors, buffer.*.pN (llvm#110714)" (llvm#111059)" [libc] Add missing include to __support/StringUtil/tables/stdc_errors.h. (llvm#111271) [libc] remove errno.h includes (llvm#110934) [NFC][rtsan] Update docs to include [[clang::blocking]] (llvm#111249) [RISCV] Give ZEXT_H_RV32 and ZEXT_H_RV64 R-type format to match PACK. NFC [mlir][SPIRV] Fix build (2) (llvm#111265) [mlir][SPIRV] Fix build error (llvm#111264) [mlir][NFC] Mark type converter in `populate...` functions as `const` (llvm#111250) [Basic] Avoid repeated hash lookups (NFC) (llvm#111228) [RISCV] Use THShift_ri class instead of RVBShift_ri for TH_TST instruction. NFC [VPlan] Only generate first lane for VPPredInstPHI if no others used. [ELF] Don't call getPPC64TargetInfo outside Driver. NFC [GISel] Don't preserve NSW flag when converting G_MUL of INT_MIN to G_SHL. (llvm#111230) [APInt] Slightly simplify APInt::ashrSlowCase. NFC (llvm#111220) [Sema] Avoid repeated hash lookups (NFC) (llvm#111227) [Affine] Avoid repeated hash lookups (NFC) (llvm#111226) [Driver] Avoid repeated hash lookups (NFC) (llvm#111225) [clang][test] Remove a broken bytecode test [ELF] Pass Ctx & [ELF] Pass Ctx & to Relocations Signed-off-by: kyvangka1610 <[email protected]>
No description provided.