Lines Matching full:ci

42 CodeCompleteConsumer *GetCodeCompletionConsumer(CompilerInstance &CI) {  in GetCodeCompletionConsumer()  argument
43 return CI.hasCodeCompletionConsumer() ? &CI.getCodeCompletionConsumer() in GetCodeCompletionConsumer()
47 void EnsureSemaIsCreated(CompilerInstance &CI, FrontendAction &Action) { in EnsureSemaIsCreated() argument
49 !CI.getFrontendOpts().CodeCompletionAt.FileName.empty()) in EnsureSemaIsCreated()
50 CI.createCodeCompletionConsumer(); in EnsureSemaIsCreated()
52 if (!CI.hasSema()) in EnsureSemaIsCreated()
53 CI.createSema(Action.getTranslationUnitKind(), in EnsureSemaIsCreated()
54 GetCodeCompletionConsumer(CI)); in EnsureSemaIsCreated()
63 InitOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
86 ReadPCHAndPreprocessAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
96 ASTPrintAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
98 CI.createDefaultOutputFile(false, InFile)) in CreateASTConsumer()
99 return CreateASTPrinter(std::move(OS), CI.getFrontendOpts().ASTDumpFilter); in CreateASTConsumer()
104 ASTDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
105 const FrontendOptions &Opts = CI.getFrontendOpts(); in CreateASTConsumer()
113 ASTDeclListAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
118 ASTViewAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
123 GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
125 if (!ComputeASTConsumerArguments(CI, /*ref*/ Sysroot)) in CreateASTConsumer()
130 CreateOutputFile(CI, InFile, /*ref*/ OutputFile); in CreateASTConsumer()
134 if (!CI.getFrontendOpts().RelocatablePCH) in CreateASTConsumer()
137 const auto &FrontendOpts = CI.getFrontendOpts(); in CreateASTConsumer()
141 CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer, in CreateASTConsumer()
143 CI.getPreprocessorOpts().AllowPCHWithCompilerErrors, in CreateASTConsumer()
145 +CI.getLangOpts().CacheGeneratedPCH)); in CreateASTConsumer()
146 Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator( in CreateASTConsumer()
147 CI, std::string(InFile), OutputFile, std::move(OS), Buffer)); in CreateASTConsumer()
152 bool GeneratePCHAction::ComputeASTConsumerArguments(CompilerInstance &CI, in ComputeASTConsumerArguments() argument
154 Sysroot = CI.getHeaderSearchOpts().Sysroot; in ComputeASTConsumerArguments()
155 if (CI.getFrontendOpts().RelocatablePCH && Sysroot.empty()) { in ComputeASTConsumerArguments()
156 CI.getDiagnostics().Report(diag::err_relocatable_without_isysroot); in ComputeASTConsumerArguments()
164 GeneratePCHAction::CreateOutputFile(CompilerInstance &CI, StringRef InFile, in CreateOutputFile() argument
167 std::unique_ptr<raw_pwrite_stream> OS = CI.createDefaultOutputFile( in CreateOutputFile()
172 OutputFile = CI.getFrontendOpts().OutputFile; in CreateOutputFile()
182 bool GeneratePCHAction::BeginSourceFileAction(CompilerInstance &CI) { in BeginSourceFileAction() argument
183 CI.getLangOpts().CompilingPCH = true; in BeginSourceFileAction()
188 GenerateModuleAction::CreateMultiplexConsumer(CompilerInstance &CI, in CreateMultiplexConsumer() argument
190 std::unique_ptr<raw_pwrite_stream> OS = CreateOutputFile(CI, InFile); in CreateMultiplexConsumer()
194 std::string OutputFile = CI.getFrontendOpts().OutputFile; in CreateMultiplexConsumer()
201 CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer, in CreateMultiplexConsumer()
202 CI.getFrontendOpts().ModuleFileExtensions, in CreateMultiplexConsumer()
204 +CI.getFrontendOpts().AllowPCMWithCompilerErrors, in CreateMultiplexConsumer()
206 +CI.getFrontendOpts().BuildingImplicitModule && in CreateMultiplexConsumer()
207 +CI.getFrontendOpts().IncludeTimestamps, in CreateMultiplexConsumer()
208 /*BuildingImplicitModule=*/+CI.getFrontendOpts().BuildingImplicitModule, in CreateMultiplexConsumer()
210 +CI.getFrontendOpts().BuildingImplicitModule)); in CreateMultiplexConsumer()
211 Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator( in CreateMultiplexConsumer()
212 CI, std::string(InFile), OutputFile, std::move(OS), Buffer)); in CreateMultiplexConsumer()
217 GenerateModuleAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
220 CreateMultiplexConsumer(CI, InFile); in CreateASTConsumer()
233 CompilerInstance &CI) { in BeginSourceFileAction() argument
234 if (!CI.getLangOpts().Modules) { in BeginSourceFileAction()
235 CI.getDiagnostics().Report(diag::err_module_build_requires_fmodules); in BeginSourceFileAction()
239 return GenerateModuleAction::BeginSourceFileAction(CI); in BeginSourceFileAction()
243 GenerateModuleFromModuleMapAction::CreateOutputFile(CompilerInstance &CI, in CreateOutputFile() argument
247 if (CI.getFrontendOpts().OutputFile.empty()) { in CreateOutputFile()
248 StringRef ModuleMapFile = CI.getFrontendOpts().OriginalModuleMap; in CreateOutputFile()
252 HeaderSearch &HS = CI.getPreprocessor().getHeaderSearchInfo(); in CreateOutputFile()
253 CI.getFrontendOpts().OutputFile = in CreateOutputFile()
254 HS.getCachedModuleFileName(CI.getLangOpts().CurrentModule, in CreateOutputFile()
259 return CI.createDefaultOutputFile(/*Binary=*/true, InFile, /*Extension=*/"", in CreateOutputFile()
266 CompilerInstance &CI) { in BeginSourceFileAction() argument
267 CI.getLangOpts().setCompilingModule(LangOptions::CMK_ModuleInterface); in BeginSourceFileAction()
269 return GenerateModuleAction::BeginSourceFileAction(CI); in BeginSourceFileAction()
273 GenerateModuleInterfaceAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
277 if (CI.getFrontendOpts().GenReducedBMI && in CreateASTConsumer()
278 !CI.getFrontendOpts().ModuleOutputPath.empty()) { in CreateASTConsumer()
280 CI.getPreprocessor(), CI.getModuleCache(), in CreateASTConsumer()
281 CI.getFrontendOpts().ModuleOutputPath)); in CreateASTConsumer()
285 CI.getPreprocessor(), CI.getModuleCache(), in CreateASTConsumer()
286 CI.getFrontendOpts().OutputFile)); in CreateASTConsumer()
292 GenerateModuleInterfaceAction::CreateOutputFile(CompilerInstance &CI, in CreateOutputFile() argument
294 return CI.createDefaultOutputFile(/*Binary=*/true, InFile, "pcm"); in CreateOutputFile()
298 GenerateReducedModuleInterfaceAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
300 return std::make_unique<ReducedBMIGenerator>(CI.getPreprocessor(), in CreateASTConsumer()
301 CI.getModuleCache(), in CreateASTConsumer()
302 CI.getFrontendOpts().OutputFile); in CreateASTConsumer()
305 bool GenerateHeaderUnitAction::BeginSourceFileAction(CompilerInstance &CI) { in BeginSourceFileAction() argument
306 if (!CI.getLangOpts().CPlusPlusModules) { in BeginSourceFileAction()
307 CI.getDiagnostics().Report(diag::err_module_interface_requires_cpp_modules); in BeginSourceFileAction()
310 CI.getLangOpts().setCompilingModule(LangOptions::CMK_HeaderUnit); in BeginSourceFileAction()
311 return GenerateModuleAction::BeginSourceFileAction(CI); in BeginSourceFileAction()
315 GenerateHeaderUnitAction::CreateOutputFile(CompilerInstance &CI, in CreateOutputFile() argument
317 return CI.createDefaultOutputFile(/*Binary=*/true, InFile, "pcm"); in CreateOutputFile()
324 SyntaxOnlyAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
329 DumpModuleInfoAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
335 VerifyPCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
340 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
341 bool Preamble = CI.getPreprocessorOpts().PrecompiledPreambleBytes.first != 0; in ExecuteAction()
342 const std::string &Sysroot = CI.getHeaderSearchOpts().Sysroot; in ExecuteAction()
344 CI.getPreprocessor(), CI.getModuleCache(), &CI.getASTContext(), in ExecuteAction()
345 CI.getPCHContainerReader(), CI.getFrontendOpts().ModuleFileExtensions, in ExecuteAction()
579 TemplightDumpAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
584 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
590 EnsureSemaIsCreated(CI, *this); in ExecuteAction()
592 CI.getSema().TemplateInstCallbacks.push_back( in ExecuteAction()
812 bool DumpModuleInfoAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
815 CI.getHeaderSearchOpts().ModuleFormat = "obj"; in BeginInvocation()
844 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
848 CI.getDiagnostics().Report(diag::err_file_is_not_module) in ExecuteAction()
854 StringRef OutputFileName = CI.getFrontendOpts().OutputFile; in ExecuteAction()
863 auto &FileMgr = CI.getFileManager(); in ExecuteAction()
869 Preprocessor &PP = CI.getPreprocessor(); in ExecuteAction()
966 getCurrentFile(), FileMgr, CI.getModuleCache(), in ExecuteAction()
967 CI.getPCHContainerReader(), in ExecuteAction()
1021 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
1039 const SourceManager &SM = CI.getSourceManager(); in ExecuteAction()
1068 CI.createDefaultOutputFile(BinaryMode, getCurrentFileOrBufferName()); in ExecuteAction()
1084 DoPrintPreprocessedInput(CI.getPreprocessor(), OS.get(), in ExecuteAction()
1085 CI.getPreprocessorOutputOpts()); in ExecuteAction()
1114 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
1115 auto Buffer = CI.getFileManager().getBufferForFile(getCurrentFile()); in ExecuteAction()
1118 Lexer::ComputePreamble((*Buffer)->getBuffer(), CI.getLangOpts()).Size; in ExecuteAction()
1124 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
1126 CI.createDefaultOutputFile(false, getCurrentFile()); in ExecuteAction()
1131 const Preprocessor &PP = CI.getPreprocessor(); in ExecuteAction()
1172 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
1173 SourceManager &SM = CI.getPreprocessor().getSourceManager(); in ExecuteAction()
1179 FromFile.getBuffer(), Tokens, Directives, &CI.getDiagnostics(), in ExecuteAction()
1181 assert(CI.getDiagnostics().hasErrorOccurred() && in ExecuteAction()
1186 if (CI.getDiagnosticOpts().VerifyDiagnostics) { in ExecuteAction()
1188 CI.getDiagnostics().setSuppressAllDiagnostics(true); in ExecuteAction()
1203 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
1204 Preprocessor &PP = CI.getPreprocessor(); in ExecuteAction()
1211 auto ModResult = CI.loadModule(FileStart, Path, Module::Hidden, false); in ExecuteAction()