Remove unneeded CheckASTConsumer function.

- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58282 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2008-10-27 22:03:52 +00:00
Родитель d6a1c5daec
Коммит 879c3eaab7
3 изменённых файлов: 4 добавлений и 20 удалений

Просмотреть файл

@ -252,14 +252,6 @@ static bool CheckResults(Preprocessor &PP,
} }
/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
bool clang::CheckASTConsumer(Preprocessor &PP, ASTConsumer* C) {
// Parse the AST and run the consumer, ultimately deleting C.
ParseAST(PP, C);
return CheckDiagnostics(PP);
}
/// CheckDiagnostics - Gather the expected diagnostics and check them. /// CheckDiagnostics - Gather the expected diagnostics and check them.
bool clang::CheckDiagnostics(Preprocessor &PP) { bool clang::CheckDiagnostics(Preprocessor &PP) {
// Gather the set of expected diagnostics. // Gather the set of expected diagnostics.

Просмотреть файл

@ -1221,7 +1221,6 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
/// ///
static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF, static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF,
const std::string &InFile, ProgActions PA) { const std::string &InFile, ProgActions PA) {
llvm::OwningPtr<ASTConsumer> Consumer; llvm::OwningPtr<ASTConsumer> Consumer;
bool ClearSourceMgr = false; bool ClearSourceMgr = false;
@ -1318,15 +1317,11 @@ static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF,
break; break;
} }
if (Consumer) { if (Consumer)
if (VerifyDiagnostics)
exit(CheckASTConsumer(PP, Consumer.get()));
ParseAST(PP, Consumer.get(), Stats, !DisableFree); ParseAST(PP, Consumer.get(), Stats, !DisableFree);
} else {
if (VerifyDiagnostics) if (VerifyDiagnostics)
exit(CheckDiagnostics(PP)); exit(CheckDiagnostics(PP));
}
if (Stats) { if (Stats) {
fprintf(stderr, "\nSTATISTICS FOR '%s':\n", InFile.c_str()); fprintf(stderr, "\nSTATISTICS FOR '%s':\n", InFile.c_str());

Просмотреть файл

@ -43,9 +43,6 @@ MinimalAction *CreatePrintParserActionsAction(IdentifierTable &);
/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C. /// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
void EmitLLVMFromASTs(Preprocessor &PP, bool PrintStats); void EmitLLVMFromASTs(Preprocessor &PP, bool PrintStats);
/// CheckASTConsumer - Implement diagnostic checking for AST consumers.
bool CheckASTConsumer(Preprocessor &PP, ASTConsumer* C);
/// CheckDiagnostics - Gather the expected diagnostics and check them. /// CheckDiagnostics - Gather the expected diagnostics and check them.
bool CheckDiagnostics(Preprocessor &PP); bool CheckDiagnostics(Preprocessor &PP);