blob: 079794d480ed85a5edb35c6139dfbd2952b3144c [file] [log] [blame]
Chris Lattner4b009652007-07-25 00:24:17 +00001//===--- 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 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 Lattner14bba0c2007-09-04 02:46:00 +000022struct LangOptions;
Chris Lattner4b009652007-07-25 00:24:17 +000023class MinimalAction;
24class TargetInfo;
25class Diagnostic;
Ted Kremenek0841c702007-09-25 18:37:20 +000026class ASTConsumer;
Steve Naroffebeb4282007-10-31 20:55:39 +000027class IdentifierTable;
Ted Kremenekb3ee1932007-12-11 21:27:55 +000028class SourceManager;
Chris Lattner4b009652007-07-25 00:24:17 +000029
30/// DoPrintPreprocessedInput - Implement -E mode.
31void 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 Naroffebeb4282007-10-31 20:55:39 +000036MinimalAction *CreatePrintParserActionsAction(IdentifierTable &);
Chris Lattner4b009652007-07-25 00:24:17 +000037
Chris Lattner4b009652007-07-25 00:24:17 +000038/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
39void EmitLLVMFromASTs(Preprocessor &PP, unsigned MainFileID,
40 bool PrintStats);
41
Ted Kremenek0841c702007-09-25 18:37:20 +000042/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
Ted Kremenek6856c632007-09-26 18:39:29 +000043bool CheckASTConsumer(Preprocessor &PP, unsigned MainFileID, ASTConsumer* C);
44
Chris Lattner4b009652007-07-25 00:24:17 +000045
46} // end namespace clang
47
48#endif