aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-07-09 00:00:58 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-07-09 00:00:58 +0000
commitd6ac4524cd441808f152f7e10900a8315ea31c08 (patch)
tree9824c0881c512b43580fb12216cd4e9ed6b7bcc6 /lib/Frontend/FrontendActions.cpp
parentd325ffb9cbd26b6a3f219d115191d9a00b6dea8c (diff)
Add a frontend option -chained-pch and don't pass an active PCH reader to the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FrontendActions.cpp')
-rw-r--r--lib/Frontend/FrontendActions.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp
index 400d35361c..694cadcd13 100644
--- a/lib/Frontend/FrontendActions.cpp
+++ b/lib/Frontend/FrontendActions.cpp
@@ -82,7 +82,9 @@ ASTConsumer *GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI,
if (CI.getFrontendOpts().RelocatablePCH)
return CreatePCHGenerator(CI.getPreprocessor(), OS,
- CI.getPCHReader(), Sysroot.c_str());
+ CI.getInvocation().getFrontendOpts().ChainedPCH ?
+ CI.getPCHReader() : 0,
+ Sysroot.c_str());
return CreatePCHGenerator(CI.getPreprocessor(), OS, CI.getPCHReader());
}