[libcxx-commits] [PATCH] D120758: [libc++] Add <ext/hash_{set, map}> to the modulemap

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 1 11:30:54 PST 2022


Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, philnik, jyknight, libc++.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

Inspired by D118616 <https://reviews.llvm.org/D118616>. This should permit <ext/__hash> to
include <__string> without triggering a "private submodule"
diagnostic (which is currently suppressed because system header,
but might soon become visible).

(I'm not claiming that this gets us exactly where we want to be. From my discussion with @jyknight on Discord it actually sounds like the existing modulemap is pretty much BS from the user's point of view, and that in order to implement http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2465r2.pdf we might have to burn it to the ground and start over. But I //do// hypothesize that making this change here will permit @philnik to remove some of the diffs in D118616 <https://reviews.llvm.org/D118616> that are concerned with `-Wprivate-header`.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120758

Files:
  libcxx/include/module.modulemap


Index: libcxx/include/module.modulemap
===================================================================
--- libcxx/include/module.modulemap
+++ libcxx/include/module.modulemap
@@ -1103,4 +1103,20 @@
       export *
     }
   } // end experimental
+
+  module ext {
+    module hash_map {
+      // The use of __DEPRECATED requires textual inclusion.
+      textual header "ext/hash_map"
+      export *
+    }
+    module hash_set {
+      // The use of __DEPRECATED requires textual inclusion.
+      textual header "ext/hash_set"
+      export *
+    }
+    module __hash {
+      private header "ext/__hash"
+    }
+  } // end ext
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120758.412179.patch
Type: text/x-patch
Size: 640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220301/7d48f7ad/attachment-0001.bin>


More information about the libcxx-commits mailing list