]> granicus.if.org Git - clang/commitdiff
Add an environment variable that makes libclang use chaining for PCH.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Fri, 6 Aug 2010 00:35:11 +0000 (00:35 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Fri, 6 Aug 2010 00:35:11 +0000 (00:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110414 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/ASTUnit.cpp

index 7c15d82d3b3ed4708d15797446ea33f4cf0b4ea7..88c55a885a22a0b79db32abe3192be201deb5804 100644 (file)
@@ -848,7 +848,9 @@ llvm::MemoryBuffer *ASTUnit::BuildPrecompiledPreamble() {
   
   // Tell the compiler invocation to generate a temporary precompiled header.
   FrontendOpts.ProgramAction = frontend::GeneratePCH;
-  // FIXME: Set ChainedPCH, once it is ready.
+  // FIXME: Set ChainedPCH unconditionally, once it is ready.
+  if (::getenv("LIBCLANG_CHAINING"))
+    FrontendOpts.ChainedPCH = true;
   // FIXME: Generate the precompiled header into memory?
   FrontendOpts.OutputFile = GetPreamblePCHPath();