Skip to content

Commit bfb1223

Browse files
committed
[libc++] Mark std::pmr virtual functions as _LIBCPP_HIDE_FROM_ABI_VIRTUAL
Reviewed By: ldionne, Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D141864
1 parent 3925fbc commit bfb1223

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

libcxx/include/__memory_resource/monotonic_buffer_resource.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class _LIBCPP_TYPE_VIS monotonic_buffer_resource : public memory_resource {
8080

8181
monotonic_buffer_resource(const monotonic_buffer_resource&) = delete;
8282

83-
_LIBCPP_HIDE_FROM_ABI ~monotonic_buffer_resource() override { release(); }
83+
_LIBCPP_HIDE_FROM_ABI_VIRTUAL ~monotonic_buffer_resource() override { release(); }
8484

8585
monotonic_buffer_resource& operator=(const monotonic_buffer_resource&) = delete;
8686

@@ -99,9 +99,9 @@ class _LIBCPP_TYPE_VIS monotonic_buffer_resource : public memory_resource {
9999
protected:
100100
void* do_allocate(size_t __bytes, size_t __alignment) override; // key function
101101

102-
_LIBCPP_HIDE_FROM_ABI void do_deallocate(void*, size_t, size_t) override {}
102+
_LIBCPP_HIDE_FROM_ABI_VIRTUAL void do_deallocate(void*, size_t, size_t) override {}
103103

104-
_LIBCPP_HIDE_FROM_ABI bool do_is_equal(const memory_resource& __other) const _NOEXCEPT override {
104+
_LIBCPP_HIDE_FROM_ABI_VIRTUAL bool do_is_equal(const memory_resource& __other) const _NOEXCEPT override {
105105
return this == std::addressof(__other);
106106
}
107107

libcxx/include/__memory_resource/synchronized_pool_resource.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ class _LIBCPP_TYPE_VIS synchronized_pool_resource : public memory_resource {
6262
_LIBCPP_HIDE_FROM_ABI pool_options options() const { return __unsync_.options(); }
6363

6464
protected:
65-
_LIBCPP_HIDE_FROM_ABI void* do_allocate(size_t __bytes, size_t __align) override {
65+
_LIBCPP_HIDE_FROM_ABI_VIRTUAL void* do_allocate(size_t __bytes, size_t __align) override {
6666
# if !defined(_LIBCPP_HAS_NO_THREADS)
6767
unique_lock<mutex> __lk(__mut_);
6868
# endif
6969
return __unsync_.allocate(__bytes, __align);
7070
}
7171

72-
_LIBCPP_HIDE_FROM_ABI void do_deallocate(void* __p, size_t __bytes, size_t __align) override {
72+
_LIBCPP_HIDE_FROM_ABI_VIRTUAL void do_deallocate(void* __p, size_t __bytes, size_t __align) override {
7373
# if !defined(_LIBCPP_HAS_NO_THREADS)
7474
unique_lock<mutex> __lk(__mut_);
7575
# endif

libcxx/include/__memory_resource/unsynchronized_pool_resource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class _LIBCPP_TYPE_VIS unsynchronized_pool_resource : public memory_resource {
7070

7171
unsynchronized_pool_resource(const unsynchronized_pool_resource&) = delete;
7272

73-
_LIBCPP_HIDE_FROM_ABI ~unsynchronized_pool_resource() override { release(); }
73+
_LIBCPP_HIDE_FROM_ABI_VIRTUAL ~unsynchronized_pool_resource() override { release(); }
7474

7575
unsynchronized_pool_resource& operator=(const unsynchronized_pool_resource&) = delete;
7676

0 commit comments

Comments
 (0)