blob: eadeb701261268e0ab909d647eb2b480c0df1e53 [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;
Reid Spencer5f016e22007-07-11 17:01:13 +000028
29/// DoPrintPreprocessedInput - Implement -E mode.
30void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP,
31 const LangOptions &Options);
32
33/// CreatePrintParserActionsAction - Return the actions implementation that
34/// implements the -parse-print-callbacks option.
Steve Naroffb4292f22007-10-31 20:55:39 +000035MinimalAction *CreatePrintParserActionsAction(IdentifierTable &);
Reid Spencer5f016e22007-07-11 17:01:13 +000036
37/// CreateTargetInfo - Return the set of target info objects as specified by
38/// the -arch command line option.
Ted Kremenekae360762007-12-03 22:06:55 +000039TargetInfo *CreateTargetInfo(const std::vector<std::string>& triples,
40 Diagnostic &Diags);
Reid Spencer5f016e22007-07-11 17:01:13 +000041
42/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
43void EmitLLVMFromASTs(Preprocessor &PP, unsigned MainFileID,
44 bool PrintStats);
45
Ted Kremenek44579782007-09-25 18:37:20 +000046/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
Ted Kremenekd39bcd82007-09-26 18:39:29 +000047bool CheckASTConsumer(Preprocessor &PP, unsigned MainFileID, ASTConsumer* C);
48
Reid Spencer5f016e22007-07-11 17:01:13 +000049
50} // end namespace clang
51
52#endif