blob: c4bbb84658a8dfdf6e24be407e0e5c390ba61520 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +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 Kremenekae360762007-12-03 22:06:55 +000017#include <vector>
18#include <string>
19
Reid Spencer5f016e22007-07-11 17:01:13 +000020namespace clang {
21class Preprocessor;
Chris Lattner717e7e32007-09-04 02:46:00 +000022struct LangOptions;
Reid Spencer5f016e22007-07-11 17:01:13 +000023class MinimalAction;
24class TargetInfo;
25class Diagnostic;
Ted Kremenek44579782007-09-25 18:37:20 +000026class ASTConsumer;
Steve Naroffb4292f22007-10-31 20:55:39 +000027class IdentifierTable;
Ted Kremenek7a9d49f2007-12-11 21:27:55 +000028class SourceManager;
Reid Spencer5f016e22007-07-11 17:01:13 +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 Naroffb4292f22007-10-31 20:55:39 +000036MinimalAction *CreatePrintParserActionsAction(IdentifierTable &);
Reid Spencer5f016e22007-07-11 17:01:13 +000037
38/// CreateTargetInfo - Return the set of target info objects as specified by
39/// the -arch command line option.
Ted Kremenek7a9d49f2007-12-11 21:27:55 +000040TargetInfo *CreateTargetInfo(SourceManager& SrcMgr,
41 const std::vector<std::string>& triples,
Ted Kremenekacc9f332007-12-05 21:34:36 +000042 Diagnostic *Diags);
Reid Spencer5f016e22007-07-11 17:01:13 +000043
44/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
45void EmitLLVMFromASTs(Preprocessor &PP, unsigned MainFileID,
46 bool PrintStats);
47
Ted Kremenek44579782007-09-25 18:37:20 +000048/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
Ted Kremenekd39bcd82007-09-26 18:39:29 +000049bool CheckASTConsumer(Preprocessor &PP, unsigned MainFileID, ASTConsumer* C);
50
Reid Spencer5f016e22007-07-11 17:01:13 +000051
52} // end namespace clang
53
54#endif