[libcxx-commits] [libcxx] 460406a - [libc++] Exclude C++03 frozen headers from the modulemap (#113572)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 24 08:57:45 PDT 2024


Author: Louis Dionne
Date: 2024-10-24T11:57:42-04:00
New Revision: 460406affeecf811d20241f073c800a7b31c5592

URL: https://github.com/llvm/llvm-project/commit/460406affeecf811d20241f073c800a7b31c5592
DIFF: https://github.com/llvm/llvm-project/commit/460406affeecf811d20241f073c800a7b31c5592.diff

LOG: [libc++] Exclude C++03 frozen headers from the modulemap (#113572)

This is a temporary patch, eventually these headers should be included
in the modulemap as well.

Added: 
    

Modified: 
    libcxx/utils/libcxx/header_information.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/header_information.py b/libcxx/utils/libcxx/header_information.py
index c5849e80f085b6..528eb9995e19f4 100644
--- a/libcxx/utils/libcxx/header_information.py
+++ b/libcxx/utils/libcxx/header_information.py
@@ -95,6 +95,10 @@ def has_cxx20_module(self) -> bool:
         removed_in_20 = ["ccomplex", "ciso646", "cstdbool", "ctgmath"]
         return self.is_public() and not self.is_experimental() and not self.is_C_compatibility() and not self._name in removed_in_20
 
+    def is_cxx03_frozen_header(self) -> bool:
+        """Returns whether the header is a frozen C++03 support header."""
+        return self._name.startswith("__cxx03/")
+
     def is_in_modulemap(self) -> bool:
         """Returns whether a header should be listed in the modulemap."""
         # TODO: Should `__config_site` be in the modulemap?
@@ -118,6 +122,11 @@ def is_in_modulemap(self) -> bool:
         # burden ourself with maintaining them in any way.
         if self._name.startswith("ext/"):
             return False
+
+        # TODO: Frozen C++03 headers should probably be in the modulemap as well
+        if self.is_cxx03_frozen_header():
+            return False
+
         return True
 
     def __str__(self) -> str:


        


More information about the libcxx-commits mailing list