1193326Sed//===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
2193326Sed//
3193326Sed//                     The LLVM Compiler Infrastructure
4193326Sed//
5193326Sed// This file is distributed under the University of Illinois Open Source
6193326Sed// License. See LICENSE.TXT for details.
7193326Sed//
8193326Sed//===----------------------------------------------------------------------===//
9193326Sed//
10193326Sed// AST Consumers.
11193326Sed//
12193326Sed//===----------------------------------------------------------------------===//
13193326Sed
14193326Sed#ifndef DRIVER_ASTCONSUMERS_H
15193326Sed#define DRIVER_ASTCONSUMERS_H
16193326Sed
17226633Sdim#include "clang/Basic/LLVM.h"
18226633Sdim
19193326Sednamespace clang {
20193326Sed
21193326Sedclass ASTConsumer;
22199482Srdivackyclass CodeGenOptions;
23226633Sdimclass DiagnosticsEngine;
24193326Sedclass FileManager;
25199482Srdivackyclass LangOptions;
26193326Sedclass Preprocessor;
27199482Srdivackyclass TargetOptions;
28193326Sed
29193326Sed// AST pretty-printer: prints out the AST in a format that is close to the
30193326Sed// original C code.  The output is intended to be in a format such that
31193326Sed// clang could re-parse the output back into the same AST, but the
32193326Sed// implementation is still incomplete.
33239462SdimASTConsumer *CreateASTPrinter(raw_ostream *OS, StringRef FilterString);
34193326Sed
35193326Sed// AST dumper: dumps the raw AST in human-readable form to stderr; this is
36193326Sed// intended for debugging.
37263508SdimASTConsumer *CreateASTDumper(StringRef FilterString, bool DumpLookups = false);
38193326Sed
39239462Sdim// AST Decl node lister: prints qualified names of all filterable AST Decl
40239462Sdim// nodes.
41239462SdimASTConsumer *CreateASTDeclNodeLister();
42239462Sdim
43193326Sed// Graphical AST viewer: for each function definition, creates a graph of
44193326Sed// the AST and displays it with the graph viewer "dotty".  Also outputs
45193326Sed// function declarations to stderr.
46193326SedASTConsumer *CreateASTViewer();
47193326Sed
48193326Sed// DeclContext printer: prints out the DeclContext tree in human-readable form
49193326Sed// to stderr; this is intended for debugging.
50193326SedASTConsumer *CreateDeclContextPrinter();
51193326Sed
52193326Sed} // end clang namespace
53193326Sed
54193326Sed#endif
55