[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
Sun Oct 30 12:46:34 PDT 2022


philnik added a comment.

In D136196#3894937 <https://reviews.llvm.org/D136196#3894937>, @EricWF wrote:

> Also, this changes the initialization/atexit behavior of derived memory resource types.
>
> Specifically, because the destructor is no longer defaulted, it's no longer trivial. So the compiler now needs to emit atexit destructors for global memory resources.
>
> I'm not sure this change actually does what we want. I need a minute to test some things.

Are you sure about that? The class is already non-trivial because it declares virtual functions, and the only difference I can find here <https://godbolt.org/z/P3qhqY1fe> is that it doesn't call the destructor of `S`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136196/new/

https://reviews.llvm.org/D136196



More information about the libcxx-commits mailing list