[all-commits] [llvm/llvm-project] 00f0c8: [Frontend] shrink in-memory PCH buffers to fit
Sam McCall via All-commits
all-commits at lists.llvm.org
Mon Apr 25 05:32:33 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 00f0c805ff7c0b5780d651d273899abe977fdca7
https://github.com/llvm/llvm-project/commit/00f0c805ff7c0b5780d651d273899abe977fdca7
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2022-04-25 (Mon, 25 Apr 2022)
Changed paths:
M clang/lib/Frontend/PrecompiledPreamble.cpp
Log Message:
-----------
[Frontend] shrink in-memory PCH buffers to fit
After building a PCH, the vector capacity is on average ~1/3 unused.
If we're going to keep it in memory for a while, reallocate to the right size.
Take care to do this once clang is destroyed so that we can reuse its
memory rather than requesting more.
Differential Revision: https://reviews.llvm.org/D124242
More information about the All-commits
mailing list