ASTConsumers.h revision 92306906ba0a57084942ef93e941dff4d2d9320e
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 DRIVER_ASTCONSUMERS_H 15#define DRIVER_ASTCONSUMERS_H 16 17#include "clang/Basic/LLVM.h" 18 19namespace clang { 20 21class ASTConsumer; 22class CodeGenOptions; 23class DiagnosticsEngine; 24class FileManager; 25class LangOptions; 26class Preprocessor; 27class TargetOptions; 28 29// AST pretty-printer: prints out the AST in a format that is close to the 30// original C code. The output is intended to be in a format such that 31// clang could re-parse the output back into the same AST, but the 32// implementation is still incomplete. 33ASTConsumer *CreateASTPrinter(raw_ostream *OS, StringRef FilterString); 34 35// AST dumper: dumps the raw AST in human-readable form to stderr; this is 36// intended for debugging. 37ASTConsumer *CreateASTDumper(StringRef FilterString, bool DumpLookups = false); 38 39// AST Decl node lister: prints qualified names of all filterable AST Decl 40// nodes. 41ASTConsumer *CreateASTDeclNodeLister(); 42 43// AST XML-dumper: dumps out the AST to stderr in a very detailed XML 44// format; this is intended for particularly intense debugging. 45ASTConsumer *CreateASTDumperXML(raw_ostream &OS); 46 47// Graphical AST viewer: for each function definition, creates a graph of 48// the AST and displays it with the graph viewer "dotty". Also outputs 49// function declarations to stderr. 50ASTConsumer *CreateASTViewer(); 51 52// DeclContext printer: prints out the DeclContext tree in human-readable form 53// to stderr; this is intended for debugging. 54ASTConsumer *CreateDeclContextPrinter(); 55 56} // end clang namespace 57 58#endif 59