ASTConsumers.h revision 249423
1238730Sdelphij//===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
2238730Sdelphij//
3238730Sdelphij//                     The LLVM Compiler Infrastructure
4238730Sdelphij//
5238730Sdelphij// This file is distributed under the University of Illinois Open Source
6238730Sdelphij// License. See LICENSE.TXT for details.
7238730Sdelphij//
8238730Sdelphij//===----------------------------------------------------------------------===//
960786Sps//
1060786Sps// AST Consumers.
1160786Sps//
1260786Sps//===----------------------------------------------------------------------===//
1360786Sps
1460786Sps#ifndef REWRITE_ASTCONSUMERS_H
1560786Sps#define REWRITE_ASTCONSUMERS_H
1660786Sps
1760786Sps#include "clang/Basic/LLVM.h"
1860786Sps#include <string>
1989019Sps
2089019Spsnamespace clang {
2160786Sps
2260786Spsclass ASTConsumer;
2360786Spsclass DiagnosticsEngine;
2460786Spsclass LangOptions;
2589019Spsclass Preprocessor;
2689019Sps
2789019Sps// ObjC rewriter: attempts to rewrite ObjC constructs into pure C code.
2889019Sps// This is considered experimental, and only works with Apple's ObjC runtime.
2989019SpsASTConsumer *CreateObjCRewriter(const std::string &InFile,
3089019Sps                                raw_ostream *OS,
3189019Sps                                DiagnosticsEngine &Diags,
3289019Sps                                const LangOptions &LOpts,
3360786Sps                                bool SilenceRewriteMacroWarning);
3489019SpsASTConsumer *CreateModernObjCRewriter(const std::string &InFile,
3589019Sps                                raw_ostream *OS,
3689019Sps                                DiagnosticsEngine &Diags,
3789019Sps                                const LangOptions &LOpts,
3889019Sps                                bool SilenceRewriteMacroWarning,
3989019Sps                                bool LineInfo);
4089019Sps
4189019Sps/// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
4289019Sps/// HTML with syntax highlighting suitable for viewing in a web-browser.
4389019SpsASTConsumer *CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP,
4489019Sps                               bool SyntaxHighlight = true,
4589019Sps                               bool HighlightMacros = true);
4689019Sps
4789019Sps} // end clang namespace
4889019Sps
4989019Sps#endif
5089019Sps