]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/ASTConsumers.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / tools / clang / include / clang / Rewrite / Frontend / ASTConsumers.h
1 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // AST Consumers.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef REWRITE_ASTCONSUMERS_H
15 #define REWRITE_ASTCONSUMERS_H
16
17 #include "clang/Basic/LLVM.h"
18 #include <string>
19
20 namespace clang {
21
22 class ASTConsumer;
23 class DiagnosticsEngine;
24 class LangOptions;
25 class Preprocessor;
26
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,
30                                 raw_ostream *OS,
31                                 DiagnosticsEngine &Diags,
32                                 const LangOptions &LOpts,
33                                 bool SilenceRewriteMacroWarning);
34 ASTConsumer *CreateModernObjCRewriter(const std::string &InFile,
35                                 raw_ostream *OS,
36                                 DiagnosticsEngine &Diags,
37                                 const LangOptions &LOpts,
38                                 bool SilenceRewriteMacroWarning,
39                                 bool LineInfo);
40
41 /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
42 /// HTML with syntax highlighting suitable for viewing in a web-browser.
43 ASTConsumer *CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP,
44                                bool SyntaxHighlight = true,
45                                bool HighlightMacros = true);
46
47 } // end clang namespace
48
49 #endif