From: Sebastian Redl Date: Fri, 9 Jul 2010 17:40:12 +0000 (+0000) Subject: Really respect -chained-pch. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a695cf3c273def77a2fd1cd8ec3a15225728cdf;p=clang Really respect -chained-pch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107993 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp index 694cadcd13..fb0c41a68b 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/lib/Frontend/FrontendActions.cpp @@ -80,13 +80,11 @@ ASTConsumer *GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, if (!OS) return 0; - if (CI.getFrontendOpts().RelocatablePCH) - return CreatePCHGenerator(CI.getPreprocessor(), OS, - CI.getInvocation().getFrontendOpts().ChainedPCH ? - CI.getPCHReader() : 0, - Sysroot.c_str()); - - return CreatePCHGenerator(CI.getPreprocessor(), OS, CI.getPCHReader()); + const PCHReader *Chain = CI.getInvocation().getFrontendOpts().ChainedPCH ? + CI.getPCHReader() : 0; + const char *isysroot = CI.getFrontendOpts().RelocatablePCH ? + Sysroot.c_str() : 0; + return CreatePCHGenerator(CI.getPreprocessor(), OS, Chain, isysroot); } ASTConsumer *InheritanceViewAction::CreateASTConsumer(CompilerInstance &CI,