Chris Lattner | 97e8b6f | 2007-10-07 06:04:32 +0000 | [diff] [blame] | 1 | //===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===// |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 0bc735f | 2007-12-29 19:59:25 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Chris Lattner | 97e8b6f | 2007-10-07 06:04:32 +0000 | [diff] [blame] | 10 | // AST Consumers. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Chris Lattner | 97e8b6f | 2007-10-07 06:04:32 +0000 | [diff] [blame] | 14 | #ifndef DRIVER_ASTCONSUMERS_H |
| 15 | #define DRIVER_ASTCONSUMERS_H |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 16 | |
Ted Kremenek | a95d375 | 2008-09-13 05:16:45 +0000 | [diff] [blame] | 17 | #include "llvm/Support/raw_ostream.h" |
Eli Friedman | 7df3d71 | 2008-02-16 23:17:23 +0000 | [diff] [blame] | 18 | #include <string> |
Ted Kremenek | ea75c55 | 2007-11-28 21:32:21 +0000 | [diff] [blame] | 19 | #include <iosfwd> |
Ted Kremenek | 1b5a4bd | 2007-11-27 21:46:50 +0000 | [diff] [blame] | 20 | |
Chris Lattner | e66b65c | 2008-02-06 01:42:25 +0000 | [diff] [blame] | 21 | namespace llvm { |
| 22 | class Module; |
| 23 | namespace sys { class Path; } |
| 24 | } |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 25 | namespace clang { |
| 26 | |
Chris Lattner | 556beb7 | 2007-09-15 22:56:56 +0000 | [diff] [blame] | 27 | class ASTConsumer; |
Chris Lattner | c0508f9 | 2007-09-15 23:21:08 +0000 | [diff] [blame] | 28 | class Diagnostic; |
Ted Kremenek | dca2466 | 2007-12-05 00:26:13 +0000 | [diff] [blame] | 29 | class FileManager; |
Chris Lattner | 3245a0a | 2008-04-16 06:11:58 +0000 | [diff] [blame] | 30 | class Preprocessor; |
Ted Kremenek | 339b9c2 | 2008-04-17 22:31:54 +0000 | [diff] [blame] | 31 | class PreprocessorFactory; |
Daniel Dunbar | 70f9243 | 2008-10-23 05:50:47 +0000 | [diff] [blame] | 32 | struct CompileOptions; |
| 33 | struct LangOptions; |
Ted Kremenek | 339b9c2 | 2008-04-17 22:31:54 +0000 | [diff] [blame] | 34 | |
Ted Kremenek | a95d375 | 2008-09-13 05:16:45 +0000 | [diff] [blame] | 35 | ASTConsumer *CreateASTPrinter(llvm::raw_ostream* OS = NULL); |
Ted Kremenek | fdfc198 | 2007-12-19 22:24:34 +0000 | [diff] [blame] | 36 | |
Chris Lattner | 3d4997d | 2007-09-15 23:02:28 +0000 | [diff] [blame] | 37 | ASTConsumer *CreateASTDumper(); |
Ted Kremenek | fdfc198 | 2007-12-19 22:24:34 +0000 | [diff] [blame] | 38 | |
Ted Kremenek | 80de08f | 2007-09-19 21:29:43 +0000 | [diff] [blame] | 39 | ASTConsumer *CreateASTViewer(); |
Ted Kremenek | fdfc198 | 2007-12-19 22:24:34 +0000 | [diff] [blame] | 40 | |
Zhongxing Xu | 2d75d6f | 2009-01-13 01:29:24 +0000 | [diff] [blame] | 41 | ASTConsumer *CreateDeclContextPrinter(); |
| 42 | |
Fariborz Jahanian | b4b2f0c | 2008-01-18 01:15:54 +0000 | [diff] [blame] | 43 | ASTConsumer *CreateCodeRewriterTest(const std::string& InFile, |
Chris Lattner | c68ab77 | 2008-03-22 00:08:40 +0000 | [diff] [blame] | 44 | const std::string& OutFile, |
Steve Naroff | 4f943c2 | 2008-03-10 20:43:59 +0000 | [diff] [blame] | 45 | Diagnostic &Diags, |
| 46 | const LangOptions &LOpts); |
Ted Kremenek | 815c78f | 2008-08-05 18:50:11 +0000 | [diff] [blame] | 47 | |
Daniel Dunbar | d69bacc | 2008-10-21 23:49:24 +0000 | [diff] [blame] | 48 | enum BackendAction { |
| 49 | Backend_EmitAssembly, |
| 50 | Backend_EmitBC, |
| 51 | Backend_EmitLL |
| 52 | }; |
| 53 | ASTConsumer *CreateBackendConsumer(BackendAction Action, |
| 54 | Diagnostic &Diags, |
| 55 | const LangOptions &Features, |
Daniel Dunbar | 70f9243 | 2008-10-23 05:50:47 +0000 | [diff] [blame] | 56 | const CompileOptions &CompileOpts, |
Daniel Dunbar | d69bacc | 2008-10-21 23:49:24 +0000 | [diff] [blame] | 57 | const std::string& InFile, |
| 58 | const std::string& OutFile, |
| 59 | bool GenerateDebugInfo); |
Ted Kremenek | fdfc198 | 2007-12-19 22:24:34 +0000 | [diff] [blame] | 60 | |
Chris Lattner | 3245a0a | 2008-04-16 06:11:58 +0000 | [diff] [blame] | 61 | ASTConsumer* CreateHTMLPrinter(const std::string &OutFile, Diagnostic &D, |
Ted Kremenek | 339b9c2 | 2008-04-17 22:31:54 +0000 | [diff] [blame] | 62 | Preprocessor *PP, PreprocessorFactory* PPF); |
Ted Kremenek | 6a34083 | 2008-03-18 21:19:49 +0000 | [diff] [blame] | 63 | |
Ted Kremenek | fdfc198 | 2007-12-19 22:24:34 +0000 | [diff] [blame] | 64 | ASTConsumer *CreateSerializationTest(Diagnostic &Diags, |
Ted Kremenek | e7d07d1 | 2008-06-04 15:55:15 +0000 | [diff] [blame] | 65 | FileManager& FMgr); |
Ted Kremenek | a1fa3a1 | 2007-12-13 00:37:31 +0000 | [diff] [blame] | 66 | |
Ted Kremenek | f06c928 | 2007-12-19 23:49:37 +0000 | [diff] [blame] | 67 | ASTConsumer *CreateASTSerializer(const std::string& InFile, |
| 68 | const std::string& EmitDir, |
Ted Kremenek | e7d07d1 | 2008-06-04 15:55:15 +0000 | [diff] [blame] | 69 | Diagnostic &Diags); |
Ted Kremenek | 055c275 | 2007-09-06 23:00:42 +0000 | [diff] [blame] | 70 | |
Steve Naroff | 1c9f81b | 2008-09-17 00:13:27 +0000 | [diff] [blame] | 71 | ASTConsumer *CreateBlockRewriter(const std::string& InFile, |
Steve Naroff | 1318895 | 2008-09-18 14:10:13 +0000 | [diff] [blame] | 72 | const std::string& OutFile, |
Steve Naroff | 1c9f81b | 2008-09-17 00:13:27 +0000 | [diff] [blame] | 73 | Diagnostic &Diags, |
| 74 | const LangOptions &LangOpts); |
Ted Kremenek | 7cae2f6 | 2008-10-23 23:36:29 +0000 | [diff] [blame] | 75 | |
| 76 | ASTConsumer *CreateInheritanceViewer(const std::string& clsname); |
| 77 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 78 | } // end clang namespace |
| 79 | |
Ted Kremenek | f4381fd | 2008-07-02 00:03:09 +0000 | [diff] [blame] | 80 | #include "AnalysisConsumer.h" |
| 81 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 82 | #endif |