diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2015-06-19 15:54:13 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2015-06-19 15:54:13 +0000 |
| commit | 55112defb087fc45b6cc1ae724d8ac04cf10b589 (patch) | |
| tree | 3dfb935998e6eed222a61a549fac69c4d7f479f1 /libcxx/include | |
| parent | b6c13ff6898ce740ec5fc938102ec3da1293d227 (diff) | |
| download | bcm5719-llvm-55112defb087fc45b6cc1ae724d8ac04cf10b589.tar.gz bcm5719-llvm-55112defb087fc45b6cc1ae724d8ac04cf10b589.zip | |
Fix PR#18843. Thanks to Howard for the fix
llvm-svn: 240136
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/memory | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxx/include/memory b/libcxx/include/memory index 03897b1c227..4c3a18c99a0 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -4073,7 +4073,10 @@ private: __enable_weak_this(const enable_shared_from_this<_Yp>* __e) _NOEXCEPT { if (__e) - __e->__weak_this_ = *this; + { + __e->__weak_this_.__ptr_ = const_cast<_Yp*>(static_cast<const _Yp*>(__e)); + __e->__weak_this_.__cntrl_ = __cntrl_; + } } _LIBCPP_INLINE_VISIBILITY |

