blob: 69434b7053505763dd92f075b592845f18209b04 [file] [log] [blame]
Chris Lattner4b009652007-07-25 00:24:17 +00001//===--- clang.h - C-Language Front-end -----------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner959e5be2007-12-29 19:59:25 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Chris Lattner4b009652007-07-25 00:24:17 +00007//
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 Kremenek40499482007-12-03 22:06:55 +000017#include <vector>
18#include <string>
19
Chris Lattner4b009652007-07-25 00:24:17 +000020namespace clang {
21class Preprocessor;
Chris Lattner4b009652007-07-25 00:24:17 +000022class MinimalAction;
23class TargetInfo;
24class Diagnostic;
Ted Kremenek0841c702007-09-25 18:37:20 +000025class ASTConsumer;
Steve Naroffebeb4282007-10-31 20:55:39 +000026class IdentifierTable;
Ted Kremenekb3ee1932007-12-11 21:27:55 +000027class SourceManager;
Chris Lattner4b009652007-07-25 00:24:17 +000028
29/// DoPrintPreprocessedInput - Implement -E mode.
Chris Lattnerefd02a32008-01-27 23:55:11 +000030void DoPrintPreprocessedInput(Preprocessor &PP, const std::string& OutFile);
Chris Lattner4b009652007-07-25 00:24:17 +000031
Chris Lattner1665a9f2008-05-08 06:52:13 +000032/// RewriteMacrosInInput - Implement -rewrite-macros mode.
Chris Lattner302b0622008-05-09 22:43:24 +000033void RewriteMacrosInInput(Preprocessor &PP, const std::string &InFileName,
34 const std::string& OutFile);
Chris Lattner1665a9f2008-05-08 06:52:13 +000035
Chris Lattner4b009652007-07-25 00:24:17 +000036/// CreatePrintParserActionsAction - Return the actions implementation that
37/// implements the -parse-print-callbacks option.
Steve Naroffebeb4282007-10-31 20:55:39 +000038MinimalAction *CreatePrintParserActionsAction(IdentifierTable &);
Chris Lattner4b009652007-07-25 00:24:17 +000039
Chris Lattner4b009652007-07-25 00:24:17 +000040/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
Ted Kremenek17861c52007-12-19 22:51:13 +000041void EmitLLVMFromASTs(Preprocessor &PP, bool PrintStats);
Chris Lattner4b009652007-07-25 00:24:17 +000042
Ted Kremenek0841c702007-09-25 18:37:20 +000043/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
Ted Kremenek17861c52007-12-19 22:51:13 +000044bool CheckASTConsumer(Preprocessor &PP, ASTConsumer* C);
Ted Kremenek6856c632007-09-26 18:39:29 +000045
Chris Lattner4b009652007-07-25 00:24:17 +000046
47} // end namespace clang
48
49#endif