[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-03 Thread Med Ismail Bennani via Phabricator via cfe-commits
mib added a comment. Hey @iana, I think this broke the lldb bot https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/6698/ Can you take a look ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 _

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-03 Thread Ian Anderson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a7a6dd3c358: [Modules] Make clang modules for the C standard library headers (authored by iana). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-02 Thread Ian Anderson via Phabricator via cfe-commits
iana marked 5 inline comments as done. iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. dexonsmith wrote: > Bigcheese wr

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-02 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 557549. iana added a comment. Minimize the testing stdint.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__std

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. Bigcheese wrote: > iana wrote: > > dexonsmith wrote: > > > benlan

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-10-02 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese added a comment. This change looks good with the stdint.h comments resolved. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. iana wrote

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-18 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. In D159064#4647709 , @vsapsai wrote: > Still going through the patch and through the discussion. But wanted to ask > if there are any complications in reverting this change? For libc++ we've > discussed that we don't really know th

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Still going through the patch and through the discussion. But wanted to ask if there are any complications in reverting this change? For libc++ we've discussed that we don't really know the perf impact of multiple small modules. So I want to make sure we aren't making d

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-14 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/module.modulemap:269 + explicit module wint_t { +header "__stddef_wint_t.h" +export * iana wrote: > Arguably this should be textual since stddef.h shouldn't own wint_t and it's > just here for co

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-13 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556630. iana added a comment. Actually allow the stdarg module Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-13 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556629. iana added a comment. Adjust for the changes in D159483 . Mostly the header guards that were added in that review have moved to this one, the stdarg module needs to always be allowed, and a few tests needed to adjust f

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-09 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556356. iana added a comment. - Drop the -verify off the stddef tests so that I can get the full errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/li

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-09 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556355. iana added a comment. - Drop the -verify off the new tests so that I can get the full errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/B

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556313. iana added a comment. Add the header guard comment to __stddef_null.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556311. iana added a comment. Try deleting the module cache to fix the failing tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. dexonsmith wrote: > benlangmuir wrote: > > iana wrote: > > > iana wrote

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. benlangmuir wrote: > iana wrote: > > iana wrote: > > > benlangmui

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Other than the giant header in the test we're still discussing, this basically LGTM. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types.

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. iana wrote: > benlangmuir wrote: > > Why do we need all this code now (

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. benlangmuir wrote: > Why do we need all this code now (I assume this is

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/test/Modules/Inputs/System/usr/include/stdint.h:2 typedef int my_awesome_nonstandard_integer_type; + +/* C99 7.18.1.1 Exact-width integer types. Why do we need all this code now (I assume this is copied from t

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne resigned from this revision. ldionne added a comment. Unfortunately I am too backed up with libc++ stuff to review with the PR transition, so I'm resigning from this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://re

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-08 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556280. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.h clang/lib/

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556231. iana added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.h clang/lib/

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556208. iana added a comment. Fix formatting issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stddef_null.

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana marked 2 inline comments as done. iana added inline comments. Comment at: clang/lib/Headers/module.modulemap:269 + explicit module wint_t { +header "__stddef_wint_t.h" +export * Arguably this should be textual since stddef.h shouldn't own wint_t and

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-07 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 556192. iana added a comment. Rebase on top of D159483 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-09-01 Thread Ian Anderson via Phabricator via cfe-commits
iana added a comment. Ah, the tests are failing because some of them are putting the builtin headers in other modules. This is going to need the "optionally ignore the builtin modules" change first then. I almost have that one finished. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554882. iana added a comment. Update Module::directlyUses Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Basic/Module.cpp clang/lib/Headers/__stdde

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554832. iana marked an inline comment as done. iana added a comment. The nullptr_t submodule can't require c23 because it needs to be used in C++ in some cases too. Remove the `requires` from the module map and add a C23 guard to the header. Repository: rG

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Headers/__stddef_null.h:14 + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern + * in the non-modules case. -

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-30 Thread Ian Anderson via Phabricator via cfe-commits
iana marked an inline comment as done. iana added inline comments. Comment at: clang/lib/Headers/__stddef_null.h:14 + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern +

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-30 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Headers/module.modulemap:156 -module _Builtin_stddef_max_align_t [system] [extern_c] { - header "__stddef_max_align_t.h" Is the assumption here that directly `@import _Builtin_stddef_max_align_t` is uns

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-29 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Headers/__stddef_null.h:14 + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern + * in the non-modules case. -

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/__stddef_null.h:14 + * __need_NULL and rely on stddef.h to redefine NULL to the correct value again. + * Modules don't support redefining macros like that, but support that pattern + * in the non-modules case. ---

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554193. iana added a comment. Add `@import` tests for all of the new modules Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files: clang/lib/Headers/__stddef_max_alig

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana updated this revision to Diff 554183. iana added a comment. Remove the module cache before running the stdarg/stddef unit tests in module mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159064/new/ https://reviews.llvm.org/D159064 Files:

[PATCH] D159064: [Modules] Make clang modules for the C standard library headers

2023-08-28 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: aaron.ballman, rsmith, efriedma, ldionne, ChuanqiXu, Bigcheese, vsapsai, benlangmuir, dexonsmith. Herald added a subscriber: ributzka. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald added