ASTConsumers.h revision 239462
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 llvm {
20193326Sed  namespace sys { class Path; }
21193326Sed}
22193326Sednamespace clang {
23193326Sed
24193326Sedclass ASTConsumer;
25199482Srdivackyclass CodeGenOptions;
26226633Sdimclass DiagnosticsEngine;
27193326Sedclass FileManager;
28199482Srdivackyclass LangOptions;
29193326Sedclass Preprocessor;
30199482Srdivackyclass TargetOptions;
31193326Sed
32193326Sed// AST pretty-printer: prints out the AST in a format that is close to the
33193326Sed// original C code.  The output is intended to be in a format such that
34193326Sed// clang could re-parse the output back into the same AST, but the
35193326Sed// implementation is still incomplete.
36239462SdimASTConsumer *CreateASTPrinter(raw_ostream *OS, StringRef FilterString);
37193326Sed
38193326Sed// AST dumper: dumps the raw AST in human-readable form to stderr; this is
39193326Sed// intended for debugging.
40239462SdimASTConsumer *CreateASTDumper(StringRef FilterString);
41193326Sed
42239462Sdim// AST Decl node lister: prints qualified names of all filterable AST Decl
43239462Sdim// nodes.
44239462SdimASTConsumer *CreateASTDeclNodeLister();
45239462Sdim
46218893Sdim// AST XML-dumper: dumps out the AST to stderr in a very detailed XML
47218893Sdim// format; this is intended for particularly intense debugging.
48226633SdimASTConsumer *CreateASTDumperXML(raw_ostream &OS);
49218893Sdim
50193326Sed// Graphical AST viewer: for each function definition, creates a graph of
51193326Sed// the AST and displays it with the graph viewer "dotty".  Also outputs
52193326Sed// function declarations to stderr.
53193326SedASTConsumer *CreateASTViewer();
54193326Sed
55193326Sed// DeclContext printer: prints out the DeclContext tree in human-readable form
56193326Sed// to stderr; this is intended for debugging.
57193326SedASTConsumer *CreateDeclContextPrinter();
58193326Sed
59193326Sed} // end clang namespace
60193326Sed
61193326Sed#endif
62