clang API Documentation

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 DRIVER_ASTCONSUMERS_H
00015 #define DRIVER_ASTCONSUMERS_H
00016 
00017 #include "clang/Basic/LLVM.h"
00018 
00019 namespace llvm {
00020   namespace sys { class Path; }
00021 }
00022 namespace clang {
00023 
00024 class ASTConsumer;
00025 class CodeGenOptions;
00026 class DiagnosticsEngine;
00027 class FileManager;
00028 class LangOptions;
00029 class Preprocessor;
00030 class TargetOptions;
00031 
00032 // AST pretty-printer: prints out the AST in a format that is close to the
00033 // original C code.  The output is intended to be in a format such that
00034 // clang could re-parse the output back into the same AST, but the
00035 // implementation is still incomplete.
00036 ASTConsumer *CreateASTPrinter(raw_ostream *OS);
00037 
00038 // AST dumper: dumps the raw AST in human-readable form to stderr; this is
00039 // intended for debugging.
00040 ASTConsumer *CreateASTDumper();
00041 
00042 // AST XML-dumper: dumps out the AST to stderr in a very detailed XML
00043 // format; this is intended for particularly intense debugging.
00044 ASTConsumer *CreateASTDumperXML(raw_ostream &OS);
00045 
00046 // Graphical AST viewer: for each function definition, creates a graph of
00047 // the AST and displays it with the graph viewer "dotty".  Also outputs
00048 // function declarations to stderr.
00049 ASTConsumer *CreateASTViewer();
00050 
00051 // DeclContext printer: prints out the DeclContext tree in human-readable form
00052 // to stderr; this is intended for debugging.
00053 ASTConsumer *CreateDeclContextPrinter();
00054 
00055 } // end clang namespace
00056 
00057 #endif