ASTConsumers.h revision 263508
1139823Simp//===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
21541Srgrimes//
31541Srgrimes//                     The LLVM Compiler Infrastructure
41541Srgrimes//
51541Srgrimes// This file is distributed under the University of Illinois Open Source
61541Srgrimes// License. See LICENSE.TXT for details.
71541Srgrimes//
81541Srgrimes//===----------------------------------------------------------------------===//
91541Srgrimes//
101541Srgrimes// AST Consumers.
111541Srgrimes//
121541Srgrimes//===----------------------------------------------------------------------===//
131541Srgrimes
141541Srgrimes#ifndef DRIVER_ASTCONSUMERS_H
151541Srgrimes#define DRIVER_ASTCONSUMERS_H
161541Srgrimes
171541Srgrimes#include "clang/Basic/LLVM.h"
181541Srgrimes
191541Srgrimesnamespace clang {
201541Srgrimes
211541Srgrimesclass ASTConsumer;
221541Srgrimesclass CodeGenOptions;
231541Srgrimesclass DiagnosticsEngine;
241541Srgrimesclass FileManager;
251541Srgrimesclass LangOptions;
261541Srgrimesclass Preprocessor;
271541Srgrimesclass TargetOptions;
281541Srgrimes
291541Srgrimes// AST pretty-printer: prints out the AST in a format that is close to the
301541Srgrimes// original C code.  The output is intended to be in a format such that
311541Srgrimes// clang could re-parse the output back into the same AST, but the
3222521Sdyson// implementation is still incomplete.
3350477SpeterASTConsumer *CreateASTPrinter(raw_ostream *OS, StringRef FilterString);
341541Srgrimes
351541Srgrimes// AST dumper: dumps the raw AST in human-readable form to stderr; this is
3683651Speter// intended for debugging.
3783651SpeterASTConsumer *CreateASTDumper(StringRef FilterString, bool DumpLookups = false);
3822521Sdyson
39214048Srmacklem// AST Decl node lister: prints qualified names of all filterable AST Decl
40214048Srmacklem// nodes.
41214048SrmacklemASTConsumer *CreateASTDeclNodeLister();
42214048Srmacklem
43184588Sdfr// Graphical AST viewer: for each function definition, creates a graph of
44184588Sdfr// the AST and displays it with the graph viewer "dotty".  Also outputs
45184588Sdfr// function declarations to stderr.
46184588SdfrASTConsumer *CreateASTViewer();
47184588Sdfr
481541Srgrimes// DeclContext printer: prints out the DeclContext tree in human-readable form
491541Srgrimes// to stderr; this is intended for debugging.
501541SrgrimesASTConsumer *CreateDeclContextPrinter();
511541Srgrimes
521541Srgrimes} // end clang namespace
531541Srgrimes
54214048Srmacklem#endif
551541Srgrimes