[libcxx-commits] [PATCH] D136196: [libc++][PMR] Move the pmr::memory_resource destructor into the dylib
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 28 07:07:04 PDT 2022
philnik updated this revision to Diff 471541.
philnik added a comment.
Rebased
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136196/new/
https://reviews.llvm.org/D136196
Files:
libcxx/include/__memory_resource/memory_resource.h
libcxx/src/memory_resource.cpp
Index: libcxx/src/memory_resource.cpp
===================================================================
--- libcxx/src/memory_resource.cpp
+++ libcxx/src/memory_resource.cpp
@@ -24,7 +24,7 @@
// memory_resource
-//memory_resource::~memory_resource() {}
+memory_resource::~memory_resource() = default;
// new_delete_resource()
Index: libcxx/include/__memory_resource/memory_resource.h
===================================================================
--- libcxx/include/__memory_resource/memory_resource.h
+++ libcxx/include/__memory_resource/memory_resource.h
@@ -24,13 +24,11 @@
// [mem.res.class]
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables") // TODO: move destructor into the dylib
class _LIBCPP_TYPE_VIS memory_resource {
static const size_t __max_align = alignof(max_align_t);
public:
- virtual ~memory_resource() = default;
+ virtual ~memory_resource();
[[using __gnu__: __returns_nonnull__, __alloc_size__(2), __alloc_align__(3)]] _LIBCPP_HIDE_FROM_ABI void*
allocate(size_t __bytes, size_t __align = __max_align) {
@@ -49,7 +47,6 @@
virtual void do_deallocate(void*, size_t, size_t) = 0;
virtual bool do_is_equal(memory_resource const&) const noexcept = 0;
};
-_LIBCPP_DIAGNOSTIC_POP
// [mem.res.eq]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136196.471541.patch
Type: text/x-patch
Size: 1301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221028/ce3669a4/attachment.bin>
More information about the libcxx-commits
mailing list