Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:59

0001 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // AST Consumers.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_CLANG_REWRITE_FRONTEND_ASTCONSUMERS_H
0014 #define LLVM_CLANG_REWRITE_FRONTEND_ASTCONSUMERS_H
0015 
0016 #include "clang/Basic/LLVM.h"
0017 #include <memory>
0018 #include <string>
0019 
0020 namespace clang {
0021 
0022 class ASTConsumer;
0023 class DiagnosticsEngine;
0024 class LangOptions;
0025 class Preprocessor;
0026 
0027 // ObjC rewriter: attempts to rewrite ObjC constructs into pure C code.
0028 // This is considered experimental, and only works with Apple's ObjC runtime.
0029 std::unique_ptr<ASTConsumer>
0030 CreateObjCRewriter(const std::string &InFile, std::unique_ptr<raw_ostream> OS,
0031                    DiagnosticsEngine &Diags, const LangOptions &LOpts,
0032                    bool SilenceRewriteMacroWarning);
0033 std::unique_ptr<ASTConsumer>
0034 CreateModernObjCRewriter(const std::string &InFile,
0035                          std::unique_ptr<raw_ostream> OS,
0036                          DiagnosticsEngine &Diags, const LangOptions &LOpts,
0037                          bool SilenceRewriteMacroWarning, bool LineInfo);
0038 
0039 /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
0040 /// HTML with syntax highlighting suitable for viewing in a web-browser.
0041 std::unique_ptr<ASTConsumer> CreateHTMLPrinter(std::unique_ptr<raw_ostream> OS,
0042                                                Preprocessor &PP,
0043                                                bool SyntaxHighlight = true,
0044                                                bool HighlightMacros = true);
0045 
0046 } // end clang namespace
0047 
0048 #endif