blob: 69b84431f4dbddeb3d9b99d19ee192f496154692 [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 Kremenek44579782007-09-25 18:37:20 +000017#include <memory>
18
Reid Spencer5f016e22007-07-11 17:01:13 +000019namespace clang {
20class Preprocessor;
Chris Lattner717e7e32007-09-04 02:46:00 +000021struct LangOptions;
Reid Spencer5f016e22007-07-11 17:01:13 +000022class MinimalAction;
23class TargetInfo;
24class Diagnostic;
Ted Kremenek44579782007-09-25 18:37:20 +000025class ASTConsumer;
Reid Spencer5f016e22007-07-11 17:01:13 +000026
27/// DoPrintPreprocessedInput - Implement -E mode.
28void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP,
29 const LangOptions &Options);
30
31/// CreatePrintParserActionsAction - Return the actions implementation that
32/// implements the -parse-print-callbacks option.
33MinimalAction *CreatePrintParserActionsAction();
34
35/// CreateTargetInfo - Return the set of target info objects as specified by
36/// the -arch command line option.
37TargetInfo *CreateTargetInfo(Diagnostic &Diags);
38
39/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
40void EmitLLVMFromASTs(Preprocessor &PP, unsigned MainFileID,
41 bool PrintStats);
42
43/// CheckDiagnostics - Implement the -parse-ast-check diagnostic verifier.
44bool CheckDiagnostics(Preprocessor &PP, unsigned MainFileID);
Ted Kremenek44579782007-09-25 18:37:20 +000045
46/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
47bool CheckASTConsumer(Preprocessor &PP, unsigned MainFileID,
48 std::auto_ptr<ASTConsumer> C);
Reid Spencer5f016e22007-07-11 17:01:13 +000049
50} // end namespace clang
51
52#endif