]> granicus.if.org Git - clang/commitdiff
Remove unneeded CheckASTConsumer function.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 27 Oct 2008 22:03:52 +0000 (22:03 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 27 Oct 2008 22:03:52 +0000 (22:03 +0000)
  - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58282 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/DiagChecker.cpp
Driver/clang.cpp
Driver/clang.h

index 51f3979b92a437387acfc7d2dbf27dbc3e1d4588..c4749512442d9bebd81f918714c69d1ba86c206f 100644 (file)
@@ -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.
index 0bc5ca43bc3a857f66577f26f8b557d9bd0cc088..ca0dc4443848ce70e27838b13d77a78bacaa8d17 100644 (file)
@@ -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());
index a3b3bcc68f6fa7768e480934930182dff894310f..46c0085f1fe1daacb3ef7e73680ec3ee846b0eff 100644 (file)
@@ -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);