[Mlir-commits] [libc] [llvm] [compiler-rt] [flang] [clang-tools-extra] [libcxx] [mlir] [clang] Make SmallVectorImpl destructor protected (PR #71439)
Andy Kaylor
llvmlistbot at llvm.org
Tue Nov 7 10:29:08 PST 2023
andykaylor wrote:
> We probably (pretty sure) don't want to add a virtual dtor to SmallVector - that'd add a vtable pointer, increasing the size in ways that are probably unacceptable given the pervasive use of the data structure.
>
> We should make the Impl dtor protected so it can't be polymorphically destroyed.
That's what I thought as well. It's not particularly clear since GitHub is highlighting the deleted constructor as the thing that changed, but that is what this PR does -- the "public" line is dropped below the destructor, making it protected.
https://github.com/llvm/llvm-project/pull/71439
More information about the Mlir-commits
mailing list