]> granicus.if.org Git - clang/blob - Driver/ASTConsumers.h
pull .ll and .bc writing out of the ASTConsumer destructors into some top
[clang] / Driver / ASTConsumers.h
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 <iosfwd>
18
19 namespace llvm {
20   class Module;
21   namespace sys { class Path; }
22 }
23 namespace clang {
24
25 class ASTConsumer;
26 class Diagnostic;
27 class FileManager;
28 struct LangOptions;
29
30 ASTConsumer *CreateASTPrinter(std::ostream* OS = NULL);
31
32 ASTConsumer *CreateASTDumper();
33
34 ASTConsumer *CreateASTViewer();
35
36 ASTConsumer *CreateCFGDumper(bool ViewGraphs = false);
37
38 ASTConsumer *CreateLiveVarAnalyzer();
39
40 ASTConsumer *CreateDeadStoreChecker(Diagnostic &Diags);
41
42 ASTConsumer *CreateUnitValsChecker(Diagnostic &Diags);
43   
44 ASTConsumer *CreateGRConstants();
45
46   
47 ASTConsumer *CreateLLVMCodeGen(Diagnostic &Diags, const LangOptions &Features,
48                                llvm::Module *&DestModule);
49
50 ASTConsumer *CreateCodeRewriterTest(const std::string& InFile,
51                                     Diagnostic &Diags);
52
53 ASTConsumer *CreateSerializationTest(Diagnostic &Diags,
54                                      FileManager& FMgr, 
55                                      const LangOptions &LOpts);
56   
57 ASTConsumer *CreateASTSerializer(const std::string& InFile,
58                                  const std::string& EmitDir,
59                                  Diagnostic &Diags,
60                                  const LangOptions &LOpts);
61
62 } // end clang namespace
63
64 #endif