Lines Matching refs:CI

37 CodeCompleteConsumer *GetCodeCompletionConsumer(CompilerInstance &CI) {  in GetCodeCompletionConsumer()  argument
38 return CI.hasCodeCompletionConsumer() ? &CI.getCodeCompletionConsumer() in GetCodeCompletionConsumer()
42 void EnsureSemaIsCreated(CompilerInstance &CI, FrontendAction &Action) { in EnsureSemaIsCreated() argument
44 !CI.getFrontendOpts().CodeCompletionAt.FileName.empty()) in EnsureSemaIsCreated()
45 CI.createCodeCompletionConsumer(); in EnsureSemaIsCreated()
47 if (!CI.hasSema()) in EnsureSemaIsCreated()
48 CI.createSema(Action.getTranslationUnitKind(), in EnsureSemaIsCreated()
49 GetCodeCompletionConsumer(CI)); in EnsureSemaIsCreated()
58 InitOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
81 ReadPCHAndPreprocessAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
91 ASTPrintAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
93 CI.createDefaultOutputFile(false, InFile)) in CreateASTConsumer()
94 return CreateASTPrinter(std::move(OS), CI.getFrontendOpts().ASTDumpFilter); in CreateASTConsumer()
99 ASTDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
100 const FrontendOptions &Opts = CI.getFrontendOpts(); in CreateASTConsumer()
108 ASTDeclListAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
113 ASTViewAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
118 GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
120 if (!ComputeASTConsumerArguments(CI, /*ref*/ Sysroot)) in CreateASTConsumer()
125 CreateOutputFile(CI, InFile, /*ref*/ OutputFile); in CreateASTConsumer()
129 if (!CI.getFrontendOpts().RelocatablePCH) in CreateASTConsumer()
132 const auto &FrontendOpts = CI.getFrontendOpts(); in CreateASTConsumer()
136 CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer, in CreateASTConsumer()
138 CI.getPreprocessorOpts().AllowPCHWithCompilerErrors, in CreateASTConsumer()
139 FrontendOpts.IncludeTimestamps, +CI.getLangOpts().CacheGeneratedPCH)); in CreateASTConsumer()
140 Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator( in CreateASTConsumer()
141 CI, std::string(InFile), OutputFile, std::move(OS), Buffer)); in CreateASTConsumer()
146 bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, in ComputeASTConsumerArguments() argument
148 Sysroot = CI.getHeaderSearchOpts().Sysroot; in ComputeASTConsumerArguments()
149 if (CI.getFrontendOpts().RelocatablePCH && Sysroot.empty()) { in ComputeASTConsumerArguments()
150 CI.getDiagnostics().Report(diag::err_relocatable_without_isysroot); in ComputeASTConsumerArguments()
158 GeneratePCHAction::CreateOutputFile(CompilerInstance &CI, StringRef InFile, in CreateOutputFile() argument
161 std::unique_ptr<raw_pwrite_stream> OS = CI.createDefaultOutputFile( in CreateOutputFile()
166 OutputFile = CI.getFrontendOpts().OutputFile; in CreateOutputFile()
176 bool GeneratePCHAction::BeginSourceFileAction(CompilerInstance &CI) { in BeginSourceFileAction() argument
177 CI.getLangOpts().CompilingPCH = true; in BeginSourceFileAction()
182 GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
184 std::unique_ptr<raw_pwrite_stream> OS = CreateOutputFile(CI, InFile); in CreateASTConsumer()
188 std::string OutputFile = CI.getFrontendOpts().OutputFile; in CreateASTConsumer()
195 CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer, in CreateASTConsumer()
196 CI.getFrontendOpts().ModuleFileExtensions, in CreateASTConsumer()
198 +CI.getFrontendOpts().AllowPCMWithCompilerErrors, in CreateASTConsumer()
200 +CI.getFrontendOpts().BuildingImplicitModule, in CreateASTConsumer()
202 +CI.getFrontendOpts().BuildingImplicitModule)); in CreateASTConsumer()
203 Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator( in CreateASTConsumer()
204 CI, std::string(InFile), OutputFile, std::move(OS), Buffer)); in CreateASTConsumer()
214 CompilerInstance &CI) { in BeginSourceFileAction() argument
215 if (!CI.getLangOpts().Modules) { in BeginSourceFileAction()
216 CI.getDiagnostics().Report(diag::err_module_build_requires_fmodules); in BeginSourceFileAction()
220 return GenerateModuleAction::BeginSourceFileAction(CI); in BeginSourceFileAction()
224 GenerateModuleFromModuleMapAction::CreateOutputFile(CompilerInstance &CI, in CreateOutputFile() argument
228 if (CI.getFrontendOpts().OutputFile.empty()) { in CreateOutputFile()
229 StringRef ModuleMapFile = CI.getFrontendOpts().OriginalModuleMap; in CreateOutputFile()
233 HeaderSearch &HS = CI.getPreprocessor().getHeaderSearchInfo(); in CreateOutputFile()
234 CI.getFrontendOpts().OutputFile = in CreateOutputFile()
235 HS.getCachedModuleFileName(CI.getLangOpts().CurrentModule, in CreateOutputFile()
240 return CI.createDefaultOutputFile(/*Binary=*/true, InFile, /*Extension=*/"", in CreateOutputFile()
247 CompilerInstance &CI) { in BeginSourceFileAction() argument
248 if (!CI.getLangOpts().ModulesTS && !CI.getLangOpts().CPlusPlusModules) { in BeginSourceFileAction()
249 CI.getDiagnostics().Report(diag::err_module_interface_requires_cpp_modules); in BeginSourceFileAction()
253 CI.getLangOpts().setCompilingModule(LangOptions::CMK_ModuleInterface); in BeginSourceFileAction()
255 return GenerateModuleAction::BeginSourceFileAction(CI); in BeginSourceFileAction()
259 GenerateModuleInterfaceAction::CreateOutputFile(CompilerInstance &CI, in CreateOutputFile() argument
261 return CI.createDefaultOutputFile(/*Binary=*/true, InFile, "pcm"); in CreateOutputFile()
265 CompilerInstance &CI) { in PrepareToExecuteAction() argument
266 if (!CI.getLangOpts().Modules) { in PrepareToExecuteAction()
267 CI.getDiagnostics().Report(diag::err_header_module_requires_modules); in PrepareToExecuteAction()
271 auto &Inputs = CI.getFrontendOpts().Inputs; in PrepareToExecuteAction()
273 return GenerateModuleAction::BeginInvocation(CI); in PrepareToExecuteAction()
283 CI.getDiagnostics().Report(diag::err_module_header_file_not_found) in PrepareToExecuteAction()
302 return GenerateModuleAction::PrepareToExecuteAction(CI); in PrepareToExecuteAction()
306 CompilerInstance &CI) { in BeginSourceFileAction() argument
307 CI.getLangOpts().setCompilingModule(LangOptions::CMK_HeaderModule); in BeginSourceFileAction()
310 auto &HS = CI.getPreprocessor().getHeaderSearchInfo(); in BeginSourceFileAction()
318 CI.getDiagnostics().Report(diag::err_module_header_file_not_found) in BeginSourceFileAction()
325 HS.getModuleMap().createHeaderModule(CI.getLangOpts().CurrentModule, Headers); in BeginSourceFileAction()
327 return GenerateModuleAction::BeginSourceFileAction(CI); in BeginSourceFileAction()
331 GenerateHeaderModuleAction::CreateOutputFile(CompilerInstance &CI, in CreateOutputFile() argument
333 return CI.createDefaultOutputFile(/*Binary=*/true, InFile, "pcm"); in CreateOutputFile()
340 SyntaxOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
345 DumpModuleInfoAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
351 VerifyPCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
356 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
357 bool Preamble = CI.getPreprocessorOpts().PrecompiledPreambleBytes.first != 0; in ExecuteAction()
358 const std::string &Sysroot = CI.getHeaderSearchOpts().Sysroot; in ExecuteAction()
360 CI.getPreprocessor(), CI.getModuleCache(), &CI.getASTContext(), in ExecuteAction()
361 CI.getPCHContainerReader(), CI.getFrontendOpts().ModuleFileExtensions, in ExecuteAction()
516 TemplightDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
521 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
527 EnsureSemaIsCreated(CI, *this); in ExecuteAction()
529 CI.getSema().TemplateInstCallbacks.push_back( in ExecuteAction()
734 bool DumpModuleInfoAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
737 CI.getHeaderSearchOpts().ModuleFormat = "obj"; in BeginInvocation()
819 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
837 const SourceManager &SM = CI.getSourceManager(); in ExecuteAction()
866 CI.createDefaultOutputFile(BinaryMode, getCurrentFileOrBufferName()); in ExecuteAction()
882 DoPrintPreprocessedInput(CI.getPreprocessor(), OS.get(), in ExecuteAction()
883 CI.getPreprocessorOutputOpts()); in ExecuteAction()
910 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
911 auto Buffer = CI.getFileManager().getBufferForFile(getCurrentFile()); in ExecuteAction()
914 Lexer::ComputePreamble((*Buffer)->getBuffer(), CI.getLangOpts()).Size; in ExecuteAction()
920 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
922 CI.createDefaultOutputFile(false, getCurrentFile()); in ExecuteAction()
927 const Preprocessor &PP = CI.getPreprocessor(); in ExecuteAction()
968 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
969 SourceManager &SM = CI.getPreprocessor().getSourceManager(); in ExecuteAction()
975 FromFile.getBuffer(), Output, Toks, &CI.getDiagnostics(), in ExecuteAction()
977 assert(CI.getDiagnostics().hasErrorOccurred() && in ExecuteAction()
982 if (CI.getDiagnosticOpts().VerifyDiagnostics) { in ExecuteAction()
984 CI.getDiagnostics().setSuppressAllDiagnostics(true); in ExecuteAction()