Lines Matching defs:CI

41 HTMLPrintAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
43 CI.createDefaultOutputFile(false, InFile))
44 return CreateHTMLPrinter(std::move(OS), CI.getPreprocessor());
52 FixItAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
96 bool FixItAction::BeginSourceFileAction(CompilerInstance &CI) {
105 Rewriter.reset(new FixItRewriter(CI.getDiagnostics(), CI.getSourceManager(),
106 CI.getLangOpts(), FixItOpts.get()));
115 bool FixItRecompile::BeginInvocation(CompilerInstance &CI) {
120 const FrontendOptions &FEOpts = CI.getFrontendOpts();
122 if (FixAction->BeginSourceFile(CI, FEOpts.Inputs[0])) {
131 FixItRewriter Rewriter(CI.getDiagnostics(), CI.getSourceManager(),
132 CI.getLangOpts(), FixItOpts.get());
142 CI.setSourceManager(nullptr);
143 CI.setFileManager(nullptr);
150 CI.getDiagnosticClient().clear();
151 CI.getDiagnostics().Reset();
153 PreprocessorOptions &PPOpts = CI.getPreprocessorOpts();
164 RewriteObjCAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
166 CI.createDefaultOutputFile(false, InFile, "cpp")) {
167 if (CI.getLangOpts().ObjCRuntime.isNonFragile())
169 CI.getDiagnostics(), CI.getLangOpts(),
170 CI.getDiagnosticOpts().NoRewriteMacros,
171 (CI.getCodeGenOpts().getDebugInfo() !=
174 CI.getDiagnostics(), CI.getLangOpts(),
175 CI.getDiagnosticOpts().NoRewriteMacros);
187 CompilerInstance &CI = getCompilerInstance();
189 CI.createDefaultOutputFile(/*Binary=*/true, getCurrentFileOrBufferName());
192 RewriteMacrosInInput(CI.getPreprocessor(), OS.get());
196 CompilerInstance &CI = getCompilerInstance();
198 CI.createDefaultOutputFile(/*Binary=*/false, getCurrentFileOrBufferName());
201 DoRewriteTest(CI.getPreprocessor(), OS.get());
205 CompilerInstance &CI;
211 RewriteImportsListener(CompilerInstance &CI, std::shared_ptr<raw_ostream> Out)
212 : CI(CI), Out(Out) {}
216 auto File = CI.getFileManager().getOptionalFileRef(Filename);
224 CI.getASTReader()->getModuleManager().lookup(*File);
245 CompilerInstance Instance(CI.getPCHContainerOperations(),
246 &CI.getModuleCache());
248 std::make_shared<CompilerInvocation>(CI.getInvocation()));
250 CI.getVirtualFileSystem(),
251 new ForwardingDiagnosticConsumer(CI.getDiagnosticClient()),
272 bool RewriteIncludesAction::BeginSourceFileAction(CompilerInstance &CI) {
275 CI.createDefaultOutputFile(/*Binary=*/true, getCurrentFileOrBufferName());
297 if (CI.getPreprocessorOutputOpts().RewriteImports) {
298 CI.createASTReader();
299 CI.getASTReader()->addListener(
300 std::make_unique<RewriteImportsListener>(CI, OutputStream));
307 CompilerInstance &CI = getCompilerInstance();
311 if (CI.getPreprocessorOutputOpts().RewriteImports) {
315 RewriteIncludesInInput(CI.getPreprocessor(), &OS,
316 CI.getPreprocessorOutputOpts());
320 RewriteIncludesInInput(CI.getPreprocessor(), OutputStream.get(),
321 CI.getPreprocessorOutputOpts());