2006-07-05 03:04:05 +08:00
|
|
|
//===--- clang.h - C-Language Front-end -----------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 03:59:25 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-07-05 03:04:05 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This is the header file that pulls together the top-level driver.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_CLANG_CLANG_H
|
|
|
|
#define LLVM_CLANG_CLANG_H
|
|
|
|
|
2007-12-04 06:06:55 +08:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2006-07-05 03:04:05 +08:00
|
|
|
namespace clang {
|
2006-07-29 14:30:25 +08:00
|
|
|
class Preprocessor;
|
2006-11-06 02:39:59 +08:00
|
|
|
class MinimalAction;
|
2006-10-14 15:39:34 +08:00
|
|
|
class TargetInfo;
|
|
|
|
class Diagnostic;
|
2007-09-26 02:37:20 +08:00
|
|
|
class ASTConsumer;
|
2007-11-01 04:55:39 +08:00
|
|
|
class IdentifierTable;
|
2007-12-12 05:27:55 +08:00
|
|
|
class SourceManager;
|
2006-07-05 03:04:05 +08:00
|
|
|
|
|
|
|
/// DoPrintPreprocessedInput - Implement -E mode.
|
2008-01-28 07:55:11 +08:00
|
|
|
void DoPrintPreprocessedInput(Preprocessor &PP, const std::string& OutFile);
|
2006-07-05 03:04:05 +08:00
|
|
|
|
2008-05-08 14:52:13 +08:00
|
|
|
/// RewriteMacrosInInput - Implement -rewrite-macros mode.
|
2008-05-10 06:43:24 +08:00
|
|
|
void RewriteMacrosInInput(Preprocessor &PP, const std::string &InFileName,
|
|
|
|
const std::string& OutFile);
|
2008-10-12 13:29:20 +08:00
|
|
|
|
|
|
|
void DoRewriteTest(Preprocessor &PP, const std::string &InFileName,
|
|
|
|
const std::string &OutFileName);
|
|
|
|
|
2008-05-08 14:52:13 +08:00
|
|
|
|
2006-08-17 13:51:27 +08:00
|
|
|
/// CreatePrintParserActionsAction - Return the actions implementation that
|
|
|
|
/// implements the -parse-print-callbacks option.
|
2008-10-31 16:56:51 +08:00
|
|
|
MinimalAction *CreatePrintParserActionsAction(Preprocessor &PP);
|
2006-08-17 13:51:27 +08:00
|
|
|
|
2008-06-13 20:15:34 +08:00
|
|
|
/// CheckDiagnostics - Gather the expected diagnostics and check them.
|
|
|
|
bool CheckDiagnostics(Preprocessor &PP);
|
|
|
|
|
2008-10-25 06:12:41 +08:00
|
|
|
/// CreateDependencyFileGen - Create dependency file generator.
|
|
|
|
/// This is only done if either -MD or -MMD has been specified.
|
|
|
|
bool CreateDependencyFileGen(Preprocessor *PP,
|
|
|
|
std::string &OutputFile,
|
|
|
|
const std::string &InputFile,
|
|
|
|
const char *&ErrStr);
|
|
|
|
|
2008-10-21 08:54:44 +08:00
|
|
|
/// CacheTokens - Cache tokens for use with PCH.
|
|
|
|
void CacheTokens(Preprocessor& PP, const std::string& OutFile);
|
2007-06-28 12:54:17 +08:00
|
|
|
|
2006-07-05 03:04:05 +08:00
|
|
|
} // end namespace clang
|
|
|
|
|
|
|
|
#endif
|