Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Oct 9, 2024

Based on a comment in #99473, it seems like export * may be overkill.

@ldionne ldionne requested a review from a team as a code owner October 9, 2024 14:01
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Oct 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 9, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

Based on a comment in #99473, it seems like export * may be overkill.


Full diff: https://github.com/llvm/llvm-project/pull/111681.diff

1 Files Affected:

  • (modified) libcxx/include/module.modulemap (+3-3)
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 22a1313498e73e..8c17945bad440b 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -73,9 +73,9 @@ module std_core [system] {
     module common_reference                           { header "__type_traits/common_reference.h" }
     module common_type {
       header "__type_traits/common_type.h"
-      // We need to export everything from this module because common_type inherits from __builtin_common_type,
-      // which needs to be re-exported.
-      export *
+      // We need to export those because common_type expands to either of those based on __builtin_common_type.
+      export std_core.type_traits.type_identity
+      export std_core.utility_core.empty
     }
     module conditional                                { header "__type_traits/conditional.h" }
     module conjunction                                { header "__type_traits/conjunction.h" }

Copy link
Contributor

@philnik777 philnik777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming the CI is happy. I hope this is actually what's needed to make the modules build happy.

Based on a comment in llvm#99473, it seems like `export *` may be overkill.
@ldionne ldionne force-pushed the review/common-type-export branch from 7076b7f to 103582f Compare October 9, 2024 18:57
@ldionne ldionne merged commit 9200ade into llvm:main Oct 9, 2024
8 of 10 checks passed
@ldionne ldionne deleted the review/common-type-export branch October 9, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants