[libcxx-commits] [PATCH] D142902: [libcxx][pmr] Make std::pmr::memory_resource ABI-compatible with GNU libstdc++ and Microsoft STL implementation.
Ruslan Arutyunyan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 30 08:30:08 PST 2023
rarutyun created this revision.
rarutyun added reviewers: ldionne, Quuxplusone, zoecarver, philnik, libc++.
rarutyun added a project: libc++.
Herald added a project: All.
rarutyun requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
The idea of this patch to make libcxx implementation of `std::pmr::memory_resource` and some of its utilities ABI-compatible with GNU and Microsoft implementation of standard library.
Since both GNU and Microsoft libraries have the name without namespace versioning we would like to remove that as well in libcxx to result in the same mangled name with GNU implementation. It also allows to let's say set `memory_resource` via `std::pmr::set_default_resource` in some library compiled with GNU/Microsoft and then read it with `std::pmr::<get|set>_default_resource` it in the library/application that is built with libcxx.
The similar technic as applied (for example) for `std::<get|set>_terminate` functions.
I believe it's worth committing this patch before release because now the latest libcxx has no implementation of memory resource. Introducing it later would be the ABI breaking change.
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov at intel.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142902
Files:
libcxx/include/__fwd/memory_resource.h
libcxx/include/__fwd/string.h
libcxx/include/__memory_resource/memory_resource.h
libcxx/include/__memory_resource/monotonic_buffer_resource.h
libcxx/include/__memory_resource/polymorphic_allocator.h
libcxx/include/__memory_resource/pool_options.h
libcxx/include/__memory_resource/synchronized_pool_resource.h
libcxx/include/__memory_resource/unsynchronized_pool_resource.h
libcxx/include/deque
libcxx/include/forward_list
libcxx/include/list
libcxx/include/map
libcxx/include/regex
libcxx/include/set
libcxx/include/unordered_map
libcxx/include/unordered_set
libcxx/include/vector
libcxx/src/memory_resource.cpp
libcxx/src/memory_resource_init_helper.h
libcxx/src/support/runtime/memory_resource_fallback.ipp
libcxx/src/support/runtime/memory_resource_init_helper.h
libcxx/src/support/runtime/memory_resource_msvc.ipp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142902.493318.patch
Type: text/x-patch
Size: 21235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230130/475c96e1/attachment-0001.bin>
More information about the libcxx-commits
mailing list