]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/tools/clang/include/clang/Rewrite/ASTConsumers.h
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
[FreeBSD/stable/9.git] / contrib / llvm / tools / clang / include / clang / Rewrite / 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 <string>
18
19 namespace llvm {
20   class raw_ostream;
21 }
22 namespace clang {
23
24 class ASTConsumer;
25 class Diagnostic;
26 class LangOptions;
27 class Preprocessor;
28
29 // ObjC rewriter: attempts to rewrite ObjC constructs into pure C code.
30 // This is considered experimental, and only works with Apple's ObjC runtime.
31 ASTConsumer *CreateObjCRewriter(const std::string &InFile,
32                                 llvm::raw_ostream *OS,
33                                 Diagnostic &Diags,
34                                 const LangOptions &LOpts,
35                                 bool SilenceRewriteMacroWarning);
36
37 /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
38 /// HTML with syntax highlighting suitable for viewing in a web-browser.
39 ASTConsumer *CreateHTMLPrinter(llvm::raw_ostream *OS, Preprocessor &PP,
40                                bool SyntaxHighlight = true,
41                                bool HighlightMacros = true);
42
43 } // end clang namespace
44
45 #endif