clang API Documentation

Rewrite/Frontend/ASTConsumers.h
Go to the documentation of this file.
00001 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // AST Consumers.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_CLANG_REWRITE_FRONTEND_ASTCONSUMERS_H
00015 #define LLVM_CLANG_REWRITE_FRONTEND_ASTCONSUMERS_H
00016 
00017 #include "clang/Basic/LLVM.h"
00018 
00019 #include <memory>
00020 #include <string>
00021 
00022 namespace clang {
00023 
00024 class ASTConsumer;
00025 class DiagnosticsEngine;
00026 class LangOptions;
00027 class Preprocessor;
00028 
00029 // ObjC rewriter: attempts to rewrite ObjC constructs into pure C code.
00030 // This is considered experimental, and only works with Apple's ObjC runtime.
00031 std::unique_ptr<ASTConsumer>
00032 CreateObjCRewriter(const std::string &InFile, raw_ostream *OS,
00033                    DiagnosticsEngine &Diags, const LangOptions &LOpts,
00034                    bool SilenceRewriteMacroWarning);
00035 std::unique_ptr<ASTConsumer>
00036 CreateModernObjCRewriter(const std::string &InFile, raw_ostream *OS,
00037                          DiagnosticsEngine &Diags, const LangOptions &LOpts,
00038                          bool SilenceRewriteMacroWarning, bool LineInfo);
00039 
00040 /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to
00041 /// HTML with syntax highlighting suitable for viewing in a web-browser.
00042 std::unique_ptr<ASTConsumer> CreateHTMLPrinter(raw_ostream *OS,
00043                                                Preprocessor &PP,
00044                                                bool SyntaxHighlight = true,
00045                                                bool HighlightMacros = true);
00046 
00047 } // end clang namespace
00048 
00049 #endif