diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-10-27 22:03:52 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-10-27 22:03:52 +0000 |
commit | 879c3eaab724689f4e8a05563192ddb52b6208ad (patch) | |
tree | 25abfa6e8e457248994526a8e8a9dba8f7a3c56c | |
parent | d6a1c5daec1ff7152f0e3ced8a461e0dc6793dfa (diff) |
Remove unneeded CheckASTConsumer function.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58282 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Driver/DiagChecker.cpp | 8 | ||||
-rw-r--r-- | Driver/clang.cpp | 13 | ||||
-rw-r--r-- | Driver/clang.h | 3 |
3 files changed, 4 insertions, 20 deletions
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<ASTConsumer> 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); |