Skip to content

Commit cd45bb2

Browse files
[libc][errno] Remove unnecessary include (#92063)
Since #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).
1 parent 364f988 commit cd45bb2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

libc/src/errno/libc_errno.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ void LIBC_NAMESPACE::Errno::operator=(int a) { __llvmlibc_errno = a; }
3636
LIBC_NAMESPACE::Errno::operator int() { return __llvmlibc_errno; }
3737

3838
#else
39-
// In overlay mode, we simply use the system errno.
40-
#include "hdr/errno_macros.h"
41-
4239
void LIBC_NAMESPACE::Errno::operator=(int a) { errno = a; }
4340
LIBC_NAMESPACE::Errno::operator int() { return errno; }
4441

0 commit comments

Comments
 (0)