aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2020-09-15 09:56:03 -0400
committerLouis Dionne <ldionne@apple.com>2020-09-15 11:04:59 -0400
commit39c8795141703a7d8313b2448d9d34e856df0b85 (patch)
tree41df119b79cff32be10a82cae47b5826c9bbeadf /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent8985755762a429573af2ce657274772339d3b9db (diff)
downloadllvm-39c8795141703a7d8313b2448d9d34e856df0b85.zip
llvm-39c8795141703a7d8313b2448d9d34e856df0b85.tar.gz
llvm-39c8795141703a7d8313b2448d9d34e856df0b85.tar.bz2
[libc++] Use allocator_traits to consistently allocate/deallocate/construct/destroy objects in std::any
https://llvm.org/PR45099 notes (correctly) that we're inconsistent in memory allocation in `std::any`. We allocate memory with `std::allocator<T>::allocate`, construct with placement new, destroy by calling the destructor directly, and deallocate by calling `delete`. Most of those are customizable by the user, but in different ways. The standard is silent on how these things are to be accomplished. This patch makes it so we use `allocator_traits<allocator<T>>` for all of these operations (allocate, construct, destruct, deallocate). This is, at least, consistent. Fixes https://llvm.org/PR45099. Differential Revision: https://reviews.llvm.org/D81133
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions