Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | //===--- clang.h - C-Language Front-end -----------------------------------===// |
| 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 | // |
| 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 | ae36076 | 2007-12-03 22:06:55 +0000 | [diff] [blame] | 17 | #include <vector> |
| 18 | #include <string> |
| 19 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 20 | namespace clang { |
| 21 | class Preprocessor; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 22 | class MinimalAction; |
| 23 | class TargetInfo; |
| 24 | class Diagnostic; |
Ted Kremenek | 4457978 | 2007-09-25 18:37:20 +0000 | [diff] [blame] | 25 | class ASTConsumer; |
Steve Naroff | b4292f2 | 2007-10-31 20:55:39 +0000 | [diff] [blame] | 26 | class IdentifierTable; |
Ted Kremenek | 7a9d49f | 2007-12-11 21:27:55 +0000 | [diff] [blame] | 27 | class SourceManager; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 28 | |
| 29 | /// DoPrintPreprocessedInput - Implement -E mode. |
Chris Lattner | e988bc2 | 2008-01-27 23:55:11 +0000 | [diff] [blame] | 30 | void DoPrintPreprocessedInput(Preprocessor &PP, const std::string& OutFile); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 31 | |
Chris Lattner | b57e3d4 | 2008-05-08 06:52:13 +0000 | [diff] [blame] | 32 | /// RewriteMacrosInInput - Implement -rewrite-macros mode. |
Chris Lattner | 0951052 | 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 | b13c5ee | 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 | b57e3d4 | 2008-05-08 06:52:13 +0000 | [diff] [blame] | 39 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 40 | /// CreatePrintParserActionsAction - Return the actions implementation that |
| 41 | /// implements the -parse-print-callbacks option. |
Daniel Dunbar | e10b0f2 | 2008-10-31 08:56:51 +0000 | [diff] [blame] | 42 | MinimalAction *CreatePrintParserActionsAction(Preprocessor &PP); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 43 | |
Argyrios Kyrtzidis | 14d4140 | 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 | 750c358 | 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 | 8588896 | 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); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 56 | |
| 57 | } // end namespace clang |
| 58 | |
| 59 | #endif |