[libc-commits] [PATCH] D149107: [libc] Ignore 'errno' on the GPU and support 'atoi'

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Apr 25 10:01:43 PDT 2023


sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/src/errno/libc_errno.h:28
 // should not refer to the "errno" macro directly.
-#ifdef LIBC_COPT_PUBLIC_PACKAGING
+#if defined(LIBC_COPT_PUBLIC_PACKAGING) && defined(LIBC_TARGET_ARCH_IS_GPU)
+extern "C" __llvm_libc::ErrnoConsumer __llvmlibc_errno;
----------------
Nit: May be a nested `ifdef` similar to the `#else` case below?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149107/new/

https://reviews.llvm.org/D149107



More information about the libc-commits mailing list