sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added a project: All.
sammccall requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125180

Files:
  clang/lib/Frontend/PrecompiledPreamble.cpp


Index: clang/lib/Frontend/PrecompiledPreamble.cpp
===================================================================
--- clang/lib/Frontend/PrecompiledPreamble.cpp
+++ clang/lib/Frontend/PrecompiledPreamble.cpp
@@ -765,6 +765,10 @@
   PreprocessorOpts.DisablePCHOrModuleValidation =
       DisableValidationForModuleKind::PCH;
 
+  // So don't bother generating the long version of the predefines buffer.
+  // The is going to overwrite it anyway (to almost nothing).
+  PreprocessorOpts.UsePredefines = false;
+
   setupPreambleStorage(*Storage, PreprocessorOpts, VFS);
 }
 


Index: clang/lib/Frontend/PrecompiledPreamble.cpp
===================================================================
--- clang/lib/Frontend/PrecompiledPreamble.cpp
+++ clang/lib/Frontend/PrecompiledPreamble.cpp
@@ -765,6 +765,10 @@
   PreprocessorOpts.DisablePCHOrModuleValidation =
       DisableValidationForModuleKind::PCH;
 
+  // So don't bother generating the long version of the predefines buffer.
+  // The is going to overwrite it anyway (to almost nothing).
+  PreprocessorOpts.UsePredefines = false;
+
   setupPreambleStorage(*Storage, PreprocessorOpts, VFS);
 }
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to