[libc++] Move preferred_name declarations into the forward declaring headers and add pmr preferred names
We currently define the preferred names in multiple places. `basic_string` and `basic_string_view` also have a lot of aliases, which makes the declarations quite long. So let's only add the preferred names in forward-declaring headers to make the implementation more readable and have all the preferred names in one place.
Reviewed By: ldionne
Spies: EricWF, krytarowski, libcxx-commits
Differential Revision: https://reviews.llvm.org/D135824
NOKEYCHECK=True
GitOrigin-RevId: 627465cf9fa71ac1933986c20b32d6842a5b2678
diff --git a/include/module.modulemap.in b/include/module.modulemap.in
index a7e3ff0..c33f5a8 100644
--- a/include/module.modulemap.in
+++ b/include/module.modulemap.in
@@ -988,6 +988,7 @@
module __memory_resource {
module memory_resource { private header "__memory_resource/memory_resource.h" }
+ module memory_resource_fwd { private header "__fwd/memory_resource.h" }
module monotonic_buffer_resource { private header "__memory_resource/monotonic_buffer_resource.h" }
module polymorphic_allocator { private header "__memory_resource/polymorphic_allocator.h" }
module pool_options { private header "__memory_resource/pool_options.h" }
@@ -1218,6 +1219,7 @@
module __string {
module char_traits { private header "__string/char_traits.h" }
module extern_template_lists { private header "__string/extern_template_lists.h" }
+ module string_fwd { private header "__fwd/string.h" }
}
export *
}