Allow a std::unique_ptr to be moved into the an IntrusiveRefCntPtr,
and remove a couple of now-unnecessary release() calls.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
| Time | Test | |
|---|---|---|
| 70 ms | x64 windows > LLVM.CodeGen/XCore::threads.ll |
Event Timeline
Comment Actions
Looks good with one minor tweak
| llvm/include/llvm/ADT/IntrusiveRefCntPtr.h | ||
|---|---|---|
| 180 | Pass 'S' by value here - that's the usual way to pass ownership of unique_ptr, and unlike the IntrusiveRefCntPtr's copy/move ctors there's no issue with invoking the operation in its implementation (infinitely recursively). | |
Comment Actions
Thanks for the review!
| llvm/include/llvm/ADT/IntrusiveRefCntPtr.h | ||
|---|---|---|
| 180 | Right, thanks; I'll update it that way before pushing the commit. | |
Pass 'S' by value here - that's the usual way to pass ownership of unique_ptr, and unlike the IntrusiveRefCntPtr's copy/move ctors there's no issue with invoking the operation in its implementation (infinitely recursively).