[PATCH] D136242: [IntervalMap] Add move and copy ctors and assignment operators
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 09:15:41 PDT 2022
Orlando updated this revision to Diff 470178.
Orlando added a comment.
It turns out my base commit was old and was missing some changes. Notably, the ` AlignedCharArrayUnion<RootLeaf, RootBranchData> data` member has since been replaced with a `union`. Apologies for the noise and additional review required as a result.
Due to the use of an anonymous union and the already tangled object lifetime situation I've changed from using the `std::swap` idiom, opting for instead explicitly cleaning up the moved-into object before the move (see `destroyTree` and `createTree`).
No issues are reported when running the unittest built with `-fsanitize=address,undefined` (are there any other sanitizers I should be using?).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136242/new/
https://reviews.llvm.org/D136242
Files:
llvm/include/llvm/ADT/IntervalMap.h
llvm/unittests/ADT/IntervalMapTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136242.470178.patch
Type: text/x-patch
Size: 6250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221024/e1f2f3f0/attachment.bin>
More information about the llvm-commits
mailing list