1 //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
14 #ifndef DRIVER_ASTCONSUMERS_H
15 #define DRIVER_ASTCONSUMERS_H
19 namespace sys { class Path; }
31 // AST pretty-printer: prints out the AST in a format that is close to the
32 // original C code. The output is intended to be in a format such that
33 // clang could re-parse the output back into the same AST, but the
34 // implementation is still incomplete.
35 ASTConsumer *CreateASTPrinter(llvm::raw_ostream *OS);
37 // AST dumper: dumps the raw AST in human-readable form to stderr; this is
38 // intended for debugging.
39 ASTConsumer *CreateASTDumper();
41 // AST XML-dumper: dumps out the AST to stderr in a very detailed XML
42 // format; this is intended for particularly intense debugging.
43 ASTConsumer *CreateASTDumperXML(llvm::raw_ostream &OS);
45 // Graphical AST viewer: for each function definition, creates a graph of
46 // the AST and displays it with the graph viewer "dotty". Also outputs
47 // function declarations to stderr.
48 ASTConsumer *CreateASTViewer();
50 // DeclContext printer: prints out the DeclContext tree in human-readable form
51 // to stderr; this is intended for debugging.
52 ASTConsumer *CreateDeclContextPrinter();
54 } // end clang namespace