diff options
| author | Peng Liu <winner245@hotmail.com> | 2024-11-26 16:00:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-26 16:00:14 -0500 |
| commit | 5ce981e76da4094efd055ded54d1f756b1286f18 (patch) | |
| tree | 33f965b61f46bb528c5a3f0cfb5d0853f5bd3962 /llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | |
| parent | cefc1b0c211fcc3f5528b72d5883f0c390d63e71 (diff) | |
| download | llvm-5ce981e76da4094efd055ded54d1f756b1286f18.zip llvm-5ce981e76da4094efd055ded54d1f756b1286f18.tar.gz llvm-5ce981e76da4094efd055ded54d1f756b1286f18.tar.bz2 | |
[libc++] Refactor vector move constructor with allocator (#116449)
This PR simplifies the implementation of std::vector's move constructor
with an alternative allocator by invoking __init_with_size() instead of
calling assign(), which ultimately calls __assign_with_size(). The
advantage of using __init_with_size() lies in its internal use of
an exception guard, which simplifies the code. Furthermore, from a
semantic standpoint, it is more intuitive for a constructor to call
an initialization function than an assignment function.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp')
0 files changed, 0 insertions, 0 deletions
