[PATCH] D47492: DWARFUnit::m_die_array swap()->shrink_to_fit()

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 02:20:45 PDT 2018


labath added a comment.

Well, if a type is trivially copyable (which DWARFDebugInfo **should** be, though I haven't checked), it should be able to do the copy via a single `memcpy` instead of a bunch of constructor calls. That should be more-or-less equivalent to realloc.

If this does not end up being implented as a memcpy here, we have an easy opportunity to improve things.


Repository:
  rL LLVM

https://reviews.llvm.org/D47492





More information about the llvm-commits mailing list