aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-08-06 00:35:11 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-08-06 00:35:11 +0000
commitf65339e0f1b9ccfc0c92c85f68bb2e72ea48a27b (patch)
tree01ed1f440cd52dd2844aeef57a74ae0cde031cb3 /lib/Frontend/ASTUnit.cpp
parenta87b1eb7f1ef233cd8739ea6052f3375751376e2 (diff)
Add an environment variable that makes libclang use chaining for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 7c15d82d3b..88c55a885a 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -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();