[all-commits] [llvm/llvm-project] 2e83cc: ADT: Support copying of IntrusiveRefCntPtr objects
David Blaikie via All-commits
all-commits at lists.llvm.org
Thu Dec 3 17:47:34 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e83ccc2ee333389110659f3cb313968a0c970d4
https://github.com/llvm/llvm-project/commit/2e83ccc2ee333389110659f3cb313968a0c970d4
Author: David Blaikie <dblaikie at gmail.com>
Date: 2020-12-03 (Thu, 03 Dec 2020)
Changed paths:
M llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
M llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
Log Message:
-----------
ADT: Support copying of IntrusiveRefCntPtr objects
This was partially supported but untested for RefCountedBase (the
implicit copy assignment would've been problematic - so delete that) and
unsupported (would not have compiled, because std::atomic is
non-copyable) for ThreadSafeRefCountedBase (implement similar support
to RefCountedBase)
Fix the test that had a copy ctor for the derived object but called
RefCountBase's default ctor from that copy ctor - which meant it wasn't
actually testing RefCountBase's copy semantics.
More information about the All-commits
mailing list