[Frontend] when attaching a preamble, don't generate the long predefines buffer.

We know we're going to overwrite it anyway.
It'd be a bit of work to coordinate not generating it at all, but setting this
flag avoids generating ~10k of the 13k string.

Differential Revision: https://reviews.llvm.org/D125180
This commit is contained in:
Sam McCall
2022-05-08 00:50:10 +02:00
parent 1ec1cdcfb4
commit 0195163dba

View File

@@ -765,6 +765,10 @@ void PrecompiledPreamble::configurePreamble(
PreprocessorOpts.DisablePCHOrModuleValidation =
DisableValidationForModuleKind::PCH;
// Don't bother generating the long version of the predefines buffer.
// The preamble is going to overwrite it anyway.
PreprocessorOpts.UsePredefines = false;
setupPreambleStorage(*Storage, PreprocessorOpts, VFS);
}