[all-commits] [llvm/llvm-project] 349354: [DebugInfo][NFC] Erase capacity in DWARFUnit::clea...
avl-llvm via All-commits
all-commits at lists.llvm.org
Fri Sep 10 00:07:50 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 349354083059bd908bd982fc5e9f298ffdb20cd2
https://github.com/llvm/llvm-project/commit/349354083059bd908bd982fc5e9f298ffdb20cd2
Author: Alexey Lapshin <a.v.lapshin at mail.ru>
Date: 2021-09-10 (Fri, 10 Sep 2021)
Changed paths:
M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list