[libc] [llvm] [libc] Move libc_errno.h to libc/src/__support and make LIBC_ERRNO_MODE_SYSTEM to be header-only. (PR #143187)

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 14:17:14 PDT 2025


================
@@ -83,14 +46,11 @@ Errno::operator int() { return shared_errno; }
 void Errno::operator=(int a) { *__llvm_libc_errno() = a; }
 Errno::operator int() { return *__llvm_libc_errno(); }
 
-#elif LIBC_ERRNO_MODE == LIBC_ERRNO_MODE_SYSTEM
----------------
vonosmas wrote:

I think it may be more readable to leave this `elif` block this is (to preserve the simple `if-elif-elif-endif` chain) but keep it empty with the comment `// Implementation for LIBC_ERRNO_MODE_SYSTEM is provided in src/__support/libc_errno.h`. WDYT?

https://github.com/llvm/llvm-project/pull/143187


More information about the llvm-commits mailing list