[DebugInfo][NFC] Erase capacity in DWARFUnit::clearDIEs().
DWARFUnit::clearDIEs() uses std::vector::shrink_to_fit() to make capacity of DieArray matched with its size(). The shrink_to_fit() is not binding request to make capacity match with size(). Thus the memory could still be reserved after DWARFUnit::clearDIEs() is called. This patch erases capacity when DWARFUnit::clearDIEs() is requested. So the memory occupied by dies would be freed. Differential Revision: https://reviews.llvm.org/D109499
Loading
Please sign in to comment