summaryrefslogtreecommitdiff
path: root/libc/src/errno
diff options
context:
space:
mode:
authorRobin Caloudis <robin.caloudis@gmx.de>2024-05-14 06:58:13 +0200
committerGitHub <noreply@github.com>2024-05-14 00:58:13 -0400
commitcd45bb2e435b8e648ac528ed5f5fc1dc2bba48fe (patch)
tree81b31976bfada3fffccead03e528974a69ddb36f /libc/src/errno
parent364f988d3feb46ead8fdb657c9eab78d93425a28 (diff)
[libc][errno] Remove unnecessary include (#92063)
Since https://github.com/llvm/llvm-project/pull/91150, a proxy header for the errno macros is available and gets included in `libc_errno.h` since then. As `libc_errno.cpp` includes `libc_errno.h`, which already includes the proxy header `hdr/errno_macros.h`, there's no need to include it in `libc_errno.cpp` if we are in overlay mode, because the proxy header takes care to either include our header from libc/include/ (fullbuild) or the corresponding underlying system header (overlay).
Diffstat (limited to 'libc/src/errno')
-rw-r--r--libc/src/errno/libc_errno.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/libc/src/errno/libc_errno.cpp b/libc/src/errno/libc_errno.cpp
index a59e6c34029d..64f9f522ca29 100644
--- a/libc/src/errno/libc_errno.cpp
+++ b/libc/src/errno/libc_errno.cpp
@@ -36,9 +36,6 @@ void LIBC_NAMESPACE::Errno::operator=(int a) { __llvmlibc_errno = a; }
LIBC_NAMESPACE::Errno::operator int() { return __llvmlibc_errno; }
#else
-// In overlay mode, we simply use the system errno.
-#include "hdr/errno_macros.h"
-
void LIBC_NAMESPACE::Errno::operator=(int a) { errno = a; }
LIBC_NAMESPACE::Errno::operator int() { return errno; }