diff --git a/libcxx/include/__memory_resource/monotonic_buffer_resource.h b/libcxx/include/__memory_resource/monotonic_buffer_resource.h --- a/libcxx/include/__memory_resource/monotonic_buffer_resource.h +++ b/libcxx/include/__memory_resource/monotonic_buffer_resource.h @@ -80,7 +80,7 @@ monotonic_buffer_resource(const monotonic_buffer_resource&) = delete; - _LIBCPP_HIDE_FROM_ABI ~monotonic_buffer_resource() override { release(); } + _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~monotonic_buffer_resource() override { release(); } monotonic_buffer_resource& operator=(const monotonic_buffer_resource&) = delete; @@ -99,9 +99,9 @@ protected: void* do_allocate(size_t __bytes, size_t __alignment) override; // key function - _LIBCPP_HIDE_FROM_ABI void do_deallocate(void*, size_t, size_t) override {} + _LIBCPP_HIDE_FROM_ABI_VIRTUAL void do_deallocate(void*, size_t, size_t) override {} - _LIBCPP_HIDE_FROM_ABI bool do_is_equal(const memory_resource& __other) const _NOEXCEPT override { + _LIBCPP_HIDE_FROM_ABI_VIRTUAL bool do_is_equal(const memory_resource& __other) const _NOEXCEPT override { return this == std::addressof(__other); } diff --git a/libcxx/include/__memory_resource/synchronized_pool_resource.h b/libcxx/include/__memory_resource/synchronized_pool_resource.h --- a/libcxx/include/__memory_resource/synchronized_pool_resource.h +++ b/libcxx/include/__memory_resource/synchronized_pool_resource.h @@ -62,14 +62,14 @@ _LIBCPP_HIDE_FROM_ABI pool_options options() const { return __unsync_.options(); } protected: - _LIBCPP_HIDE_FROM_ABI void* do_allocate(size_t __bytes, size_t __align) override { + _LIBCPP_HIDE_FROM_ABI_VIRTUAL void* do_allocate(size_t __bytes, size_t __align) override { # if !defined(_LIBCPP_HAS_NO_THREADS) unique_lock __lk(__mut_); # endif return __unsync_.allocate(__bytes, __align); } - _LIBCPP_HIDE_FROM_ABI void do_deallocate(void* __p, size_t __bytes, size_t __align) override { + _LIBCPP_HIDE_FROM_ABI_VIRTUAL void do_deallocate(void* __p, size_t __bytes, size_t __align) override { # if !defined(_LIBCPP_HAS_NO_THREADS) unique_lock __lk(__mut_); # endif diff --git a/libcxx/include/__memory_resource/unsynchronized_pool_resource.h b/libcxx/include/__memory_resource/unsynchronized_pool_resource.h --- a/libcxx/include/__memory_resource/unsynchronized_pool_resource.h +++ b/libcxx/include/__memory_resource/unsynchronized_pool_resource.h @@ -70,7 +70,7 @@ unsynchronized_pool_resource(const unsynchronized_pool_resource&) = delete; - _LIBCPP_HIDE_FROM_ABI ~unsynchronized_pool_resource() override { release(); } + _LIBCPP_HIDE_FROM_ABI_VIRTUAL ~unsynchronized_pool_resource() override { release(); } unsynchronized_pool_resource& operator=(const unsynchronized_pool_resource&) = delete;