• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/clang/lib/Frontend/Rewrite/

Lines Matching refs: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 std::string(InFile), std::move(OS), CI.getDiagnostics(),
170 CI.getLangOpts(), CI.getDiagnosticOpts().NoRewriteMacros,
171 (CI.getCodeGenOpts().getDebugInfo() != codegenoptions::NoDebugInfo));
173 CI.getDiagnostics(), CI.getLangOpts(),
174 CI.getDiagnosticOpts().NoRewriteMacros);
186 CompilerInstance &CI = getCompilerInstance();
188 CI.createDefaultOutputFile(true, getCurrentFileOrBufferName());
191 RewriteMacrosInInput(CI.getPreprocessor(), OS.get());
195 CompilerInstance &CI = getCompilerInstance();
197 CI.createDefaultOutputFile(false, getCurrentFileOrBufferName());
200 DoRewriteTest(CI.getPreprocessor(), OS.get());
204 CompilerInstance &CI;
210 RewriteImportsListener(CompilerInstance &CI, std::shared_ptr<raw_ostream> Out)
211 : CI(CI), Out(Out) {}
215 auto File = CI.getFileManager().getFile(Filename);
223 CI.getASTReader()->getModuleManager().lookup(*File);
244 CompilerInstance Instance(CI.getPCHContainerOperations(),
245 &CI.getModuleCache());
247 std::make_shared<CompilerInvocation>(CI.getInvocation()));
249 new ForwardingDiagnosticConsumer(CI.getDiagnosticClient()),
270 bool RewriteIncludesAction::BeginSourceFileAction(CompilerInstance &CI) {
273 CI.createDefaultOutputFile(true, getCurrentFileOrBufferName());
295 if (CI.getPreprocessorOutputOpts().RewriteImports) {
296 CI.createASTReader();
297 CI.getASTReader()->addListener(
298 std::make_unique<RewriteImportsListener>(CI, OutputStream));
305 CompilerInstance &CI = getCompilerInstance();
309 if (CI.getPreprocessorOutputOpts().RewriteImports) {
313 RewriteIncludesInInput(CI.getPreprocessor(), &OS,
314 CI.getPreprocessorOutputOpts());
318 RewriteIncludesInInput(CI.getPreprocessor(), OutputStream.get(),
319 CI.getPreprocessorOutputOpts());