[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
Sat Oct 29 13:07:50 PDT 2022


philnik updated this revision to Diff 471777.
philnik added a comment.

Rebased; updated ABI list


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/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
  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/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
===================================================================
--- libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1252,6 +1252,9 @@
 {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 168, 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZNSt3__13pmr15memory_resourceD0Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__13pmr15memory_resourceD1Ev', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__13pmr15memory_resourceD2Ev', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__13pmr19new_delete_resourceEv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__13pmr20get_default_resourceEv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__13pmr20null_memory_resourceEv', 'type': 'FUNC'}
@@ -1984,6 +1987,7 @@
 {'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDiEE', 'size': 96, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IDsEE', 'size': 96, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZTVNSt3__120__codecvt_utf8_utf16IwEE', 'size': 96, 'type': 'OBJECT'}
+{'is_defined': True, 'name': '_ZTVNSt3__13pmr15memory_resourceE', 'size': 56, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZTVNSt3__13pmr25monotonic_buffer_resourceE', 'size': 56, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZTVNSt3__13pmr26__null_memory_resource_impE', 'size': 56, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZTVNSt3__13pmr26synchronized_pool_resourceE', 'size': 56, 'type': 'OBJECT'}
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.471777.patch
Type: text/x-patch
Size: 3222 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221029/966147b9/attachment-0001.bin>


More information about the libcxx-commits mailing list