Lines Matching refs:CI
109 BackendConsumer::BackendConsumer(CompilerInstance &CI, BackendAction Action, in BackendConsumer() argument
117 : CI(CI), Diags(CI.getDiagnostics()), CodeGenOpts(CI.getCodeGenOpts()), in BackendConsumer()
118 TargetOpts(CI.getTargetOpts()), LangOpts(CI.getLangOpts()), in BackendConsumer()
121 CI.getHeaderSearchOpts(), CI.getPreprocessorOpts(), in BackendConsumer()
122 CI.getCodeGenOpts(), C, CoverageInfo)), in BackendConsumer()
128 LLVMIRGeneration.init("irgen", "LLVM IR generation", CI.getTimerGroup()); in BackendConsumer()
168 CI.getFrontendTimer().yieldTo(LLVMIRGeneration); in HandleTopLevelDecl()
173 LLVMIRGeneration.yieldTo(CI.getFrontendTimer()); in HandleTopLevelDecl()
183 CI.getFrontendTimer().yieldTo(LLVMIRGeneration); in HandleInlineFunctionDefinition()
188 LLVMIRGeneration.yieldTo(CI.getFrontendTimer()); in HandleInlineFunctionDefinition()
239 CI.getFrontendTimer().yieldTo(LLVMIRGeneration); in HandleTranslationUnit()
244 LLVMIRGeneration.yieldTo(CI.getFrontendTimer()); in HandleTranslationUnit()
316 emitBackendOutput(CI, CI.getCodeGenOpts(), in HandleTranslationUnit()
878 bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { in loadLinkModules() argument
883 CI.getCodeGenOpts().LinkBitcodeFiles) { in loadLinkModules()
884 auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); in loadLinkModules()
886 CI.getDiagnostics().Report(diag::err_cannot_open_file) in loadLinkModules()
896 CI.getDiagnostics().Report(diag::err_cannot_open_file) in loadLinkModules()
932 bool CodeGenAction::BeginSourceFileAction(CompilerInstance &CI) { in BeginSourceFileAction() argument
933 if (CI.getFrontendOpts().GenReducedBMI) in BeginSourceFileAction()
934 CI.getLangOpts().setCompilingModule(LangOptions::CMK_ModuleInterface); in BeginSourceFileAction()
939 GetOutputStream(CompilerInstance &CI, StringRef InFile, BackendAction Action) { in GetOutputStream() argument
942 return CI.createDefaultOutputFile(false, InFile, "s"); in GetOutputStream()
944 return CI.createDefaultOutputFile(false, InFile, "ll"); in GetOutputStream()
946 return CI.createDefaultOutputFile(true, InFile, "bc"); in GetOutputStream()
950 return CI.createNullOutputFile(); in GetOutputStream()
952 return CI.createDefaultOutputFile(true, InFile, "o"); in GetOutputStream()
959 CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { in CreateASTConsumer() argument
961 std::unique_ptr<raw_pwrite_stream> OS = CI.takeOutputStream(); in CreateASTConsumer()
963 OS = GetOutputStream(CI, InFile, BA); in CreateASTConsumer()
969 if (loadLinkModules(CI)) in CreateASTConsumer()
974 if (CI.getCodeGenOpts().CoverageMapping) in CreateASTConsumer()
976 CI.getPreprocessor()); in CreateASTConsumer()
979 CI, BA, &CI.getVirtualFileSystem(), *VMContext, std::move(LinkModules), in CreateASTConsumer()
985 if (CI.getCodeGenOpts().getDebugInfo() != codegenoptions::NoDebugInfo && in CreateASTConsumer()
986 CI.getCodeGenOpts().MacroDebugInfo) { in CreateASTConsumer()
989 CI.getPreprocessor()); in CreateASTConsumer()
990 CI.getPreprocessor().addPPCallbacks(std::move(Callbacks)); in CreateASTConsumer()
993 if (CI.getFrontendOpts().GenReducedBMI && in CreateASTConsumer()
994 !CI.getFrontendOpts().ModuleOutputPath.empty()) { in CreateASTConsumer()
997 CI.getPreprocessor(), CI.getModuleCache(), in CreateASTConsumer()
998 CI.getFrontendOpts().ModuleOutputPath); in CreateASTConsumer()
1008 CompilerInstance &CI = getCompilerInstance(); in loadModule() local
1009 SourceManager &SM = CI.getSourceManager(); in loadModule()
1013 CI.getDiagnostics().getCustomDiagID(DiagnosticsEngine::Error, "%0"); in loadModule()
1015 CI.getDiagnostics().Report(DiagID) << EIB.message(); in loadModule()
1023 if (!CI.getCodeGenOpts().ThinLTOIndexFile.empty()) { in loadModule()
1036 M->setTargetTriple(Triple(CI.getTargetOpts().Triple)); in loadModule()
1047 if (loadLinkModules(CI)) in loadModule()
1058 CI.getDiagnostics().Report(diag::err_invalid_llvm_ir) << VerifierErr; in loadModule()
1103 CI.getDiagnostics().getCustomDiagID(DiagnosticsEngine::Error, "%0"); in loadModule()
1105 CI.getDiagnostics().Report(Loc, DiagID) << Msg; in loadModule()
1117 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
1118 auto &CodeGenOpts = CI.getCodeGenOpts(); in ExecuteAction()
1119 auto &Diagnostics = CI.getDiagnostics(); in ExecuteAction()
1121 GetOutputStream(CI, getCurrentFileOrBufferName(), BA); in ExecuteAction()
1125 SourceManager &SM = CI.getSourceManager(); in ExecuteAction()
1135 const TargetOptions &TargetOpts = CI.getTargetOpts(); in ExecuteAction()
1157 BackendConsumer Result(CI, BA, &CI.getVirtualFileSystem(), *VMContext, in ExecuteAction()
1187 emitBackendOutput(CI, CI.getCodeGenOpts(), in ExecuteAction()
1188 CI.getTarget().getDataLayoutString(), TheModule.get(), BA, in ExecuteAction()
1189 CI.getFileManager().getVirtualFileSystemPtr(), in ExecuteAction()