diff --git a/clang/lib/Interpreter/IncrementalAction.cpp b/clang/lib/Interpreter/IncrementalAction.cpp index 67313a8cd2a8c..4d1bc4c59e851 100644 --- a/clang/lib/Interpreter/IncrementalAction.cpp +++ b/clang/lib/Interpreter/IncrementalAction.cpp @@ -22,25 +22,25 @@ #include "llvm/Support/ErrorHandling.h" namespace clang { -IncrementalAction::IncrementalAction(CompilerInstance &CI, +IncrementalAction::IncrementalAction(CompilerInstance &Instance, llvm::LLVMContext &LLVMCtx, llvm::Error &Err, Interpreter &I, std::unique_ptr Consumer) : WrapperFrontendAction([&]() { llvm::ErrorAsOutParameter EAO(&Err); std::unique_ptr Act; - switch (CI.getFrontendOpts().ProgramAction) { + switch (Instance.getFrontendOpts().ProgramAction) { default: Err = llvm::createStringError( std::errc::state_not_recoverable, "Driver initialization failed. " "Incremental mode for action %d is not supported", - CI.getFrontendOpts().ProgramAction); + Instance.getFrontendOpts().ProgramAction); return Act; case frontend::ASTDump: case frontend::ASTPrint: case frontend::ParseSyntaxOnly: - Act = CreateFrontendAction(CI); + Act = CreateFrontendAction(Instance); break; case frontend::PluginAction: case frontend::EmitAssembly: @@ -53,12 +53,13 @@ IncrementalAction::IncrementalAction(CompilerInstance &CI, } return Act; }()), - Interp(I), CI(CI), Consumer(std::move(Consumer)) {} + Interp(I), CI(Instance), Consumer(std::move(Consumer)) {} std::unique_ptr -IncrementalAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { +IncrementalAction::CreateASTConsumer(CompilerInstance & /*CI*/, + StringRef InFile) { std::unique_ptr C = - WrapperFrontendAction::CreateASTConsumer(CI, InFile); + WrapperFrontendAction::CreateASTConsumer(this->CI, InFile); if (Consumer) { std::vector> Cs; @@ -148,4 +149,4 @@ bool InProcessPrintingASTConsumer::HandleTopLevelDecl(DeclGroupRef DGR) { return MultiplexConsumer::HandleTopLevelDecl(DGR); } -} // namespace clang \ No newline at end of file +} // namespace clang diff --git a/clang/lib/Interpreter/IncrementalAction.h b/clang/lib/Interpreter/IncrementalAction.h index b9dd087f258de..725cdd0c27cf4 100644 --- a/clang/lib/Interpreter/IncrementalAction.h +++ b/clang/lib/Interpreter/IncrementalAction.h @@ -42,7 +42,7 @@ class IncrementalAction : public WrapperFrontendAction { std::unique_ptr CachedInCodeGenModule; public: - IncrementalAction(CompilerInstance &CI, llvm::LLVMContext &LLVMCtx, + IncrementalAction(CompilerInstance &Instance, llvm::LLVMContext &LLVMCtx, llvm::Error &Err, Interpreter &I, std::unique_ptr Consumer = nullptr);