Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 1 | //===--- clang.h - C-Language Front-end -----------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 959e5be | 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. |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This is the header file that pulls together the top-level driver. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_CLANG_CLANG_H |
| 15 | #define LLVM_CLANG_CLANG_H |
| 16 | |
Ted Kremenek | 4049948 | 2007-12-03 22:06:55 +0000 | [diff] [blame] | 17 | #include <vector> |
| 18 | #include <string> |
| 19 | |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 20 | namespace clang { |
| 21 | class Preprocessor; |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 22 | class MinimalAction; |
| 23 | class TargetInfo; |
| 24 | class Diagnostic; |
Ted Kremenek | 0841c70 | 2007-09-25 18:37:20 +0000 | [diff] [blame] | 25 | class ASTConsumer; |
Steve Naroff | ebeb428 | 2007-10-31 20:55:39 +0000 | [diff] [blame] | 26 | class IdentifierTable; |
Ted Kremenek | b3ee193 | 2007-12-11 21:27:55 +0000 | [diff] [blame] | 27 | class SourceManager; |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 28 | |
| 29 | /// DoPrintPreprocessedInput - Implement -E mode. |
Chris Lattner | efd02a3 | 2008-01-27 23:55:11 +0000 | [diff] [blame] | 30 | void DoPrintPreprocessedInput(Preprocessor &PP, const std::string& OutFile); |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 31 | |
Chris Lattner | 1665a9f | 2008-05-08 06:52:13 +0000 | [diff] [blame] | 32 | /// RewriteMacrosInInput - Implement -rewrite-macros mode. |
Chris Lattner | 302b062 | 2008-05-09 22:43:24 +0000 | [diff] [blame] | 33 | void RewriteMacrosInInput(Preprocessor &PP, const std::string &InFileName, |
| 34 | const std::string& OutFile); |
Chris Lattner | c3fbf39 | 2008-10-12 05:29:20 +0000 | [diff] [blame] | 35 | |
| 36 | void DoRewriteTest(Preprocessor &PP, const std::string &InFileName, |
| 37 | const std::string &OutFileName); |
| 38 | |
Chris Lattner | 1665a9f | 2008-05-08 06:52:13 +0000 | [diff] [blame] | 39 | |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 40 | /// CreatePrintParserActionsAction - Return the actions implementation that |
| 41 | /// implements the -parse-print-callbacks option. |
Daniel Dunbar | 747a95e | 2008-10-31 08:56:51 +0000 | [diff] [blame] | 42 | MinimalAction *CreatePrintParserActionsAction(Preprocessor &PP); |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 43 | |
Argiris Kirtzidis | 8d83376 | 2008-06-13 12:15:34 +0000 | [diff] [blame] | 44 | /// CheckDiagnostics - Gather the expected diagnostics and check them. |
| 45 | bool CheckDiagnostics(Preprocessor &PP); |
| 46 | |
Daniel Dunbar | 35fe5de | 2008-10-24 22:12:41 +0000 | [diff] [blame] | 47 | /// CreateDependencyFileGen - Create dependency file generator. |
| 48 | /// This is only done if either -MD or -MMD has been specified. |
| 49 | bool CreateDependencyFileGen(Preprocessor *PP, |
| 50 | std::string &OutputFile, |
| 51 | const std::string &InputFile, |
| 52 | const char *&ErrStr); |
| 53 | |
Ted Kremenek | 71c6cc6 | 2008-10-21 00:54:44 +0000 | [diff] [blame] | 54 | /// CacheTokens - Cache tokens for use with PCH. |
| 55 | void CacheTokens(Preprocessor& PP, const std::string& OutFile); |
Chris Lattner | 4b00965 | 2007-07-25 00:24:17 +0000 | [diff] [blame] | 56 | |
| 57 | } // end namespace clang |
| 58 | |
| 59 | #endif |