[PATCH] D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized

Ian Anderson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 00:00:23 PDT 2023


iana created this revision.
iana added reviewers: aaron.ballman, rsmith, efriedma, ldionne.
Herald added subscribers: Enna1, ributzka, mstorsjo, kadircet, arphaman.
Herald added a project: All.
iana requested review of this revision.
Herald added projects: clang, Sanitizers, LLVM, clang-tools-extra.
Herald added subscribers: cfe-commits, llvm-commits, Sanitizers.

stdarg.h and stddef.h have to be textual headers in their upcoming modules to support their `__needs_xxx` macros. That means that they won't get precompiled into their modules' pcm, and instead their declarations will go into every other pcm that uses them. For now that's ok since the type merger can handle the declarations in these headers, but it's suboptimal at best. Make separate headers for all of the pieces so that they can be properly modularized.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158709

Files:
  clang-tools-extra/clang-include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
  clang-tools-extra/clangd/index/CanonicalIncludes.cpp
  clang/lib/Headers/CMakeLists.txt
  clang/lib/Headers/__stdarg___gnuc_va_list.h
  clang/lib/Headers/__stdarg___va_copy.h
  clang/lib/Headers/__stdarg_va_arg.h
  clang/lib/Headers/__stdarg_va_copy.h
  clang/lib/Headers/__stdarg_va_list.h
  clang/lib/Headers/__stddef_null.h
  clang/lib/Headers/__stddef_nullptr_t.h
  clang/lib/Headers/__stddef_offsetof.h
  clang/lib/Headers/__stddef_ptrdiff_t.h
  clang/lib/Headers/__stddef_rsize_t.h
  clang/lib/Headers/__stddef_size_t.h
  clang/lib/Headers/__stddef_unreachable.h
  clang/lib/Headers/__stddef_wchar_t.h
  clang/lib/Headers/__stddef_wint_t.h
  clang/lib/Headers/stdarg.h
  clang/lib/Headers/stddef.h
  clang/test/Headers/stddef.c
  clang/test/Headers/stddefneeds.c
  compiler-rt/lib/gwp_asan/guarded_pool_allocator.h
  llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158709.553011.patch
Type: text/x-patch
Size: 22682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230824/6ab91366/attachment-0001.bin>


More information about the cfe-commits mailing list