[libc-commits] [PATCH] D154036: [libc] Add support for creating wrapper headers for offloading in clang

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 29 08:54:20 PDT 2023


jhuber6 updated this revision to Diff 535835.
jhuber6 added a comment.

Semi-fix hack for `string.h` and fix `ctype.h`. `string.h` required undefining
C++ mode so we didn't use weird GNU C++ handling, which we then still need the
`extern "C"` for. The cytpe problems come from GNU defining everything as a
macro so it fails to redeclare.

The amount of hacks that just this has required so far is fairly convincing to
me that this is the more correct solution and should be separate from `libc`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154036

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Headers/CMakeLists.txt
  clang/lib/Headers/llvm_libc_wrappers/ctype.h
  clang/lib/Headers/llvm_libc_wrappers/llvm-libc-decls/README.txt
  clang/lib/Headers/llvm_libc_wrappers/stdio.h
  clang/lib/Headers/llvm_libc_wrappers/stdlib.h
  clang/lib/Headers/llvm_libc_wrappers/string.h
  clang/test/Driver/gpu-libc-headers.c
  libc/cmake/modules/LLVMLibCHeaderRules.cmake
  libc/include/CMakeLists.txt
  libc/utils/HdrGen/Generator.cpp
  libc/utils/HdrGen/Generator.h
  libc/utils/HdrGen/Main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154036.535835.patch
Type: text/x-patch
Size: 19536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230629/32d0141c/attachment-0001.bin>


More information about the libc-commits mailing list