1243791Sdim//===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
2243791Sdim//
3243791Sdim//                     The LLVM Compiler Infrastructure
4243791Sdim//
5243791Sdim// This file is distributed under the University of Illinois Open Source
6243791Sdim// License. See LICENSE.TXT for details.
7243791Sdim//
8243791Sdim//===----------------------------------------------------------------------===//
9243791Sdim//
10243791Sdim// AST Consumers.
11243791Sdim//
12243791Sdim//===----------------------------------------------------------------------===//
13243791Sdim
14243791Sdim#ifndef REWRITE_ASTCONSUMERS_H
15243791Sdim#define REWRITE_ASTCONSUMERS_H
16243791Sdim
17243791Sdim#include "clang/Basic/LLVM.h"
18243791Sdim#include <string>
19243791Sdim
20243791Sdimnamespace clang {
21243791Sdim
22243791Sdimclass ASTConsumer;
23243791Sdimclass DiagnosticsEngine;
24243791Sdimclass LangOptions;
25243791Sdimclass Preprocessor;
26243791Sdim
27243791Sdim// ObjC rewriter: attempts to rewrite ObjC constructs into pure C code.
28243791Sdim// This is considered experimental, and only works with Apple's ObjC runtime.
29243791SdimASTConsumer *CreateObjCRewriter(const std::string &InFile,
30243791Sdim                                raw_ostream *OS,
31243791Sdim                                DiagnosticsEngine &Diags,
32243791Sdim                                const LangOptions &LOpts,
33243791Sdim                                bool SilenceRewriteMacroWarning);
34243791SdimASTConsumer *CreateModernObjCRewriter(const std::string &InFile,
35243791Sdim                                raw_ostream *OS,
36243791Sdim                                DiagnosticsEngine &Diags,
37243791Sdim                                const LangOptions &LOpts,
38249423Sdim                                bool SilenceRewriteMacroWarning,
39249423Sdim                                bool LineInfo);
40243791Sdim
41243791Sdim/// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
42243791Sdim/// HTML with syntax highlighting suitable for viewing in a web-browser.
43243791SdimASTConsumer *CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP,
44243791Sdim                               bool SyntaxHighlight = true,
45243791Sdim                               bool HighlightMacros = true);
46243791Sdim
47243791Sdim} // end clang namespace
48243791Sdim
49243791Sdim#endif
50