[all-commits] [llvm/llvm-project] 7fe356: [Clang] Gut the libc wrapper headers and simplify ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Nov 19 05:18:37 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7fe35641672b6431134e99af658bd79fd438da54
      https://github.com/llvm/llvm-project/commit/7fe35641672b6431134e99af658bd79fd438da54
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2025-11-19 (Wed, 19 Nov 2025)

  Changed paths:
    M clang/lib/Headers/llvm_libc_wrappers/assert.h
    M clang/lib/Headers/llvm_libc_wrappers/ctype.h
    M clang/lib/Headers/llvm_libc_wrappers/inttypes.h
    R clang/lib/Headers/llvm_libc_wrappers/llvm-libc-decls/README.txt
    M clang/lib/Headers/llvm_libc_wrappers/stdio.h
    M clang/lib/Headers/llvm_libc_wrappers/stdlib.h
    M clang/lib/Headers/llvm_libc_wrappers/string.h
    M clang/lib/Headers/llvm_libc_wrappers/time.h
    M libc/cmake/modules/LLVMLibCHeaderRules.cmake
    M libc/docs/dev/header_generation.rst
    R libc/utils/hdrgen/hdrgen/gpu_headers.py
    M libc/utils/hdrgen/hdrgen/yaml_to_classes.py

  Log Message:
  -----------
  [Clang] Gut the libc wrapper headers and simplify (#168438)

Summary:
These were originally intended to represent the functions that are
present on the GPU as to be provided by the LLVM libc implementation.
The original plan was that LLVM libc would report which functions were
supported and then the offload interface would mark those as supported.
The problem is that these wrapper headers are very difficult to make
work given the various libc extensions everyone does so they were
extremely fragile.

OpenMP already declares all functions used inside of a target region as
implicitly host / device, while these headers weren't even used for CUDA
/ HIP yet anyway. The only things we need to define right now are the
stdio FILE types. If we want to make this work for CUDA we'd need to
define these manually, but we're a ways off and that's way easier
because they do proper overloading.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list