From: Daniel Dunbar Date: Mon, 27 Oct 2008 22:03:52 +0000 (+0000) Subject: Remove unneeded CheckASTConsumer function. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=879c3eaab724689f4e8a05563192ddb52b6208ad;p=clang Remove unneeded CheckASTConsumer function. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58282 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/DiagChecker.cpp b/Driver/DiagChecker.cpp index 51f3979b92..c474951244 100644 --- a/Driver/DiagChecker.cpp +++ b/Driver/DiagChecker.cpp @@ -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. bool clang::CheckDiagnostics(Preprocessor &PP) { // Gather the set of expected diagnostics. diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 0bc5ca43bc..ca0dc44438 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -1221,7 +1221,6 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile, /// static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF, const std::string &InFile, ProgActions PA) { - llvm::OwningPtr Consumer; bool ClearSourceMgr = false; @@ -1318,15 +1317,11 @@ static void ProcessInputFile(Preprocessor &PP, PreprocessorFactory &PPF, break; } - if (Consumer) { - if (VerifyDiagnostics) - exit(CheckASTConsumer(PP, Consumer.get())); - + if (Consumer) ParseAST(PP, Consumer.get(), Stats, !DisableFree); - } else { - if (VerifyDiagnostics) - exit(CheckDiagnostics(PP)); - } + + if (VerifyDiagnostics) + exit(CheckDiagnostics(PP)); if (Stats) { fprintf(stderr, "\nSTATISTICS FOR '%s':\n", InFile.c_str()); diff --git a/Driver/clang.h b/Driver/clang.h index a3b3bcc68f..46c0085f1f 100644 --- a/Driver/clang.h +++ b/Driver/clang.h @@ -43,9 +43,6 @@ MinimalAction *CreatePrintParserActionsAction(IdentifierTable &); /// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C. 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. bool CheckDiagnostics(Preprocessor &PP);