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 | // |
| 5 | // This file was developed by Chris Lattner and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 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; |
Chris Lattner | 717e7e3 | 2007-09-04 02:46:00 +0000 | [diff] [blame] | 22 | struct LangOptions; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 23 | class MinimalAction; |
| 24 | class TargetInfo; |
| 25 | class Diagnostic; |
Ted Kremenek | 4457978 | 2007-09-25 18:37:20 +0000 | [diff] [blame] | 26 | class ASTConsumer; |
Steve Naroff | b4292f2 | 2007-10-31 20:55:39 +0000 | [diff] [blame] | 27 | class IdentifierTable; |
Ted Kremenek | 7a9d49f | 2007-12-11 21:27:55 +0000 | [diff] [blame] | 28 | class SourceManager; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 29 | |
| 30 | /// DoPrintPreprocessedInput - Implement -E mode. |
| 31 | void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP, |
| 32 | const LangOptions &Options); |
| 33 | |
| 34 | /// CreatePrintParserActionsAction - Return the actions implementation that |
| 35 | /// implements the -parse-print-callbacks option. |
Steve Naroff | b4292f2 | 2007-10-31 20:55:39 +0000 | [diff] [blame] | 36 | MinimalAction *CreatePrintParserActionsAction(IdentifierTable &); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 37 | |
| 38 | /// CreateTargetInfo - Return the set of target info objects as specified by |
| 39 | /// the -arch command line option. |
Ted Kremenek | 7a9d49f | 2007-12-11 21:27:55 +0000 | [diff] [blame] | 40 | TargetInfo *CreateTargetInfo(SourceManager& SrcMgr, |
| 41 | const std::vector<std::string>& triples, |
Ted Kremenek | acc9f33 | 2007-12-05 21:34:36 +0000 | [diff] [blame] | 42 | Diagnostic *Diags); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 43 | |
| 44 | /// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C. |
| 45 | void EmitLLVMFromASTs(Preprocessor &PP, unsigned MainFileID, |
| 46 | bool PrintStats); |
| 47 | |
Ted Kremenek | 4457978 | 2007-09-25 18:37:20 +0000 | [diff] [blame] | 48 | /// CheckASTConsumer - Implement diagnostic checking for AST consumers. |
Ted Kremenek | d39bcd8 | 2007-09-26 18:39:29 +0000 | [diff] [blame] | 49 | bool CheckASTConsumer(Preprocessor &PP, unsigned MainFileID, ASTConsumer* C); |
| 50 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 51 | |
| 52 | } // end namespace clang |
| 53 | |
| 54 | #endif |