1 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
14 #ifndef REWRITE_ASTCONSUMERS_H
15 #define REWRITE_ASTCONSUMERS_H
17 #include "clang/Basic/LLVM.h"
23 class DiagnosticsEngine;
27 // ObjC rewriter: attempts to rewrite ObjC constructs into pure C code.
28 // This is considered experimental, and only works with Apple's ObjC runtime.
29 ASTConsumer *CreateObjCRewriter(const std::string &InFile,
31 DiagnosticsEngine &Diags,
32 const LangOptions &LOpts,
33 bool SilenceRewriteMacroWarning);
34 ASTConsumer *CreateModernObjCRewriter(const std::string &InFile,
36 DiagnosticsEngine &Diags,
37 const LangOptions &LOpts,
38 bool SilenceRewriteMacroWarning);
40 /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
41 /// HTML with syntax highlighting suitable for viewing in a web-browser.
42 ASTConsumer *CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP,
43 bool SyntaxHighlight = true,
44 bool HighlightMacros = true);
46 } // end clang namespace