[libc++] Introduce __for_each_segment and use it in copy/move
authorNikolas Klauser <nikolasklauser@berlin.de>
Thu, 1 Jun 2023 01:14:24 +0000 (18:14 -0700)
committerNikolas Klauser <nikolasklauser@berlin.de>
Thu, 1 Jun 2023 01:15:20 +0000 (18:15 -0700)
commitdc124cda7c7808e4cadc8cf6d24c73680878a3d2
treec25ebc59952b08e5659f5ca7e7d9b54af645e800
parent85af42df5dbb964d767feb16a5551dddb36fd4f1
[libc++] Introduce __for_each_segment and use it in copy/move

This simplifies the code inside copy/move and makes it easier to apply the optimization to other algorithms.

Reviewed By: ldionne, Mordante, #libc

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D151265
libcxx/include/CMakeLists.txt
libcxx/include/__algorithm/copy.h
libcxx/include/__algorithm/for_each_segment.h [new file with mode: 0644]
libcxx/include/__algorithm/move.h
libcxx/include/module.modulemap.in
libcxx/test/libcxx/private_headers.verify.cpp
libcxx/utils/data/ignore_format.txt
libcxx/utils/libcxx/test/params.py