Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
[clang.git] / include / clang / Frontend / ASTConsumers.h
blobc45bd40706005cbeb8d528f4265cfb27ac679a53
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.
12 //===----------------------------------------------------------------------===//
14 #ifndef DRIVER_ASTCONSUMERS_H
15 #define DRIVER_ASTCONSUMERS_H
17 #include <string>
19 namespace llvm {
20 class raw_ostream;
21 namespace sys { class Path; }
23 namespace clang {
25 class ASTConsumer;
26 class CodeGenOptions;
27 class Diagnostic;
28 class FileManager;
29 class LangOptions;
30 class Preprocessor;
31 class TargetOptions;
33 // AST pretty-printer: prints out the AST in a format that is close to the
34 // original C code. The output is intended to be in a format such that
35 // clang could re-parse the output back into the same AST, but the
36 // implementation is still incomplete.
37 ASTConsumer *CreateASTPrinter(llvm::raw_ostream *OS);
39 // AST XML-printer: prints out the AST in a XML format
40 // The output is intended to be in a format such that
41 // clang or any other tool could re-parse the output back into the same AST,
42 // but the implementation is still incomplete.
43 ASTConsumer *CreateASTPrinterXML(llvm::raw_ostream *OS);
45 // AST dumper: dumps the raw AST in human-readable form to stderr; this is
46 // intended for debugging.
47 ASTConsumer *CreateASTDumper();
49 // AST XML-dumper: dumps out the AST to stderr in a very detailed XML
50 // format; this is intended for particularly intense debugging.
51 ASTConsumer *CreateASTDumperXML(llvm::raw_ostream &OS);
53 // Graphical AST viewer: for each function definition, creates a graph of
54 // the AST and displays it with the graph viewer "dotty". Also outputs
55 // function declarations to stderr.
56 ASTConsumer *CreateASTViewer();
58 // DeclContext printer: prints out the DeclContext tree in human-readable form
59 // to stderr; this is intended for debugging.
60 ASTConsumer *CreateDeclContextPrinter();
62 } // end clang namespace
64 #endif