__functional/invoke.h currently only includes __type_traits/invoke.h and not all of type_traits. Keep it using the specific header, and update its export. Similarly, __type_traits/underlying_type.h currently only includes __type_traits/is_enum.h, so update its export as well. This requires adding lots of export statements to the module map to keep the transitive includes working. Adding direct includes to the headers fixes check-cxx, but leaves many run-buildbot generic-modules tests failing, some even with linker errors.
Details
- Reviewers
ldionne Mordante Bigcheese - Group Reviewers
Restricted Project - Commits
- rGebd2ed2aa88d: [libc++][Modules] std.functional.__functional.invoke and std.type_traits.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
D153672 replaced __debug, whose module did export *, with __debug_utils/strict_weak_ordering_check.h, whose module has no exports. Other parts were relying on __debug's module exporting __type_traits/is_constant_evaluated.h. Make __debug_utils/strict_weak_ordering_check.h export that, and update __algorithm/sort.h's module to export __debug_utils/strict_weak_ordering_check.h.
LGTM without the script.
I spoke at length with @iana about this patch, in particular about the fact that these exports are pretty arbitrary. They are, but so are some of the exports we already have in the modulemap anyway. Let's move forward with this because I get the feeling that the only way to make progress here is to get to D144322 ASAP and then clean up the mess in our modulemap once we can actually see failures in the CI.
libcxx/utils/find_transitive_includes.py | ||
---|---|---|
2 | Let's not check in this script since it was only (?) useful as a tool for you to come up with this patch. We don't expect to ever have to do this again, right? |
Let's not check in this script since it was only (?) useful as a tool for you to come up with this patch. We don't expect to ever have to do this again, right?