diff options
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 12 | ||||
-rw-r--r-- | lib/Frontend/FrontendActions.cpp | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index b8d9f2f8c2..e3d56367fd 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -771,10 +771,9 @@ class PrecompilePreambleConsumer : public PCHGenerator, std::vector<Decl *> TopLevelDecls; public: - PrecompilePreambleConsumer(ASTUnit &Unit, - const Preprocessor &PP, bool Chaining, + PrecompilePreambleConsumer(ASTUnit &Unit, const Preprocessor &PP, StringRef isysroot, raw_ostream *Out) - : PCHGenerator(PP, "", Chaining, isysroot, Out), Unit(Unit), + : PCHGenerator(PP, "", isysroot, Out), Unit(Unit), Hash(Unit.getCurrentTopLevelHashValue()) { Hash = 0; } @@ -827,10 +826,9 @@ public: std::string Sysroot; std::string OutputFile; raw_ostream *OS = 0; - bool Chaining; if (GeneratePCHAction::ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, - OS, Chaining)) + OS)) return 0; if (!CI.getFrontendOpts().RelocatablePCH) @@ -838,8 +836,8 @@ public: CI.getPreprocessor().addPPCallbacks( new MacroDefinitionTrackerPPCallbacks(Unit.getCurrentTopLevelHashValue())); - return new PrecompilePreambleConsumer(Unit, CI.getPreprocessor(), Chaining, - Sysroot, OS); + return new PrecompilePreambleConsumer(Unit, CI.getPreprocessor(), Sysroot, + OS); } virtual bool hasCodeCompletionSupport() const { return false; } diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp index 5e2b9c473f..e05d5767ea 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/lib/Frontend/FrontendActions.cpp @@ -78,23 +78,19 @@ ASTConsumer *GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, std::string Sysroot; std::string OutputFile; raw_ostream *OS = 0; - bool Chaining; - if (ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, OS, - Chaining)) + if (ComputeASTConsumerArguments(CI, InFile, Sysroot, OutputFile, OS)) return 0; if (!CI.getFrontendOpts().RelocatablePCH) Sysroot.clear(); - return new PCHGenerator(CI.getPreprocessor(), OutputFile, Chaining, Sysroot, - OS); + return new PCHGenerator(CI.getPreprocessor(), OutputFile, Sysroot, OS); } bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, StringRef InFile, std::string &Sysroot, std::string &OutputFile, - raw_ostream *&OS, - bool &Chaining) { + raw_ostream *&OS) { Sysroot = CI.getHeaderSearchOpts().Sysroot; if (CI.getFrontendOpts().RelocatablePCH && Sysroot.empty()) { CI.getDiagnostics().Report(diag::err_relocatable_without_isysroot); @@ -111,8 +107,6 @@ bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, return true; OutputFile = CI.getFrontendOpts().OutputFile; - Chaining = CI.getInvocation().getFrontendOpts().ChainedPCH && - !CI.getPreprocessorOpts().ImplicitPCHInclude.empty(); return false; } |