[cfe-commits] r46786 - in /cfe/trunk: Driver/DiagChecker.cpp Driver/clang.cpp Sema/ASTStreamer.cpp Sema/ParseAST.cpp clang.xcodeproj/project.pbxproj include/clang/Sema/ASTStreamer.h include/clang/Sema/ParseAST.h

Chris Lattner sabre at nondot.org
Tue Feb 5 16:23:22 PST 2008


Author: lattner
Date: Tue Feb  5 18:23:21 2008
New Revision: 46786

URL: http://llvm.org/viewvc/llvm-project?rev=46786&view=rev
Log:
rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}

Added:
    cfe/trunk/Sema/ParseAST.cpp
      - copied, changed from r46785, cfe/trunk/Sema/ASTStreamer.cpp
    cfe/trunk/include/clang/Sema/ParseAST.h
Removed:
    cfe/trunk/Sema/ASTStreamer.cpp
    cfe/trunk/include/clang/Sema/ASTStreamer.h
Modified:
    cfe/trunk/Driver/DiagChecker.cpp
    cfe/trunk/Driver/clang.cpp
    cfe/trunk/clang.xcodeproj/project.pbxproj

Modified: cfe/trunk/Driver/DiagChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/DiagChecker.cpp?rev=46786&r1=46785&r2=46786&view=diff

==============================================================================
--- cfe/trunk/Driver/DiagChecker.cpp (original)
+++ cfe/trunk/Driver/DiagChecker.cpp Tue Feb  5 18:23:21 2008
@@ -14,7 +14,7 @@
 #include "clang.h"
 #include "ASTConsumers.h"
 #include "TextDiagnosticBuffer.h"
-#include "clang/Sema/ASTStreamer.h"
+#include "clang/Sema/ParseAST.h"
 #include "clang/AST/ASTConsumer.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Preprocessor.h"

Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=46786&r1=46785&r2=46786&view=diff

==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Tue Feb  5 18:23:21 2008
@@ -27,7 +27,7 @@
 #include "TextDiagnosticBuffer.h"
 #include "TextDiagnosticPrinter.h"
 #include "clang/AST/TranslationUnit.h"
-#include "clang/Sema/ASTStreamer.h"
+#include "clang/Sema/ParseAST.h"
 #include "clang/AST/ASTConsumer.h"
 #include "clang/Parse/Parser.h"
 #include "clang/Lex/HeaderSearch.h"

Removed: cfe/trunk/Sema/ASTStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/ASTStreamer.cpp?rev=46785&view=auto

==============================================================================
--- cfe/trunk/Sema/ASTStreamer.cpp (original)
+++ cfe/trunk/Sema/ASTStreamer.cpp (removed)
@@ -1,71 +0,0 @@
-//===--- ASTStreamer.cpp - Provide streaming interface to ASTs ------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the ASTStreamer interface.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Sema/ASTStreamer.h"
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTConsumer.h"
-#include "Sema.h"
-#include "clang/Parse/Action.h"
-#include "clang/Parse/Parser.h"
-using namespace clang;
-
-ASTConsumer::~ASTConsumer() {}
-
-//===----------------------------------------------------------------------===//
-// Public interface to the file
-//===----------------------------------------------------------------------===//
-
-/// ParseAST - Parse the entire file specified, notifying the ASTConsumer as
-/// the file is parsed.  This takes ownership of the ASTConsumer and
-/// ultimately deletes it.
-void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats) {
-  // Collect global stats on Decls/Stmts (until we have a module streamer).
-  if (PrintStats) {
-    Decl::CollectingStats(true);
-    Stmt::CollectingStats(true);
-  }
-  
-  ASTContext Context(PP.getSourceManager(), PP.getTargetInfo(),
-                     PP.getIdentifierTable(), PP.getSelectorTable());
-  
-  Parser P(PP, *new Sema(PP, Context));
-  PP.EnterMainSourceFile();
-    
-  // Initialize the parser.
-  P.Initialize();
-  
-  Consumer->Initialize(Context);
-  
-  Parser::DeclTy *ADecl;
-  while (!P.ParseTopLevelDecl(ADecl)) {  // Not end of file.
-    // If we got a null return and something *was* parsed, ignore it.  This
-    // is due to a top-level semicolon, an action override, or a parse error
-    // skipping something.
-    if (ADecl)
-      Consumer->HandleTopLevelDecl(static_cast<Decl*>(ADecl));
-  };
-
-  if (PrintStats) {
-    fprintf(stderr, "\nSTATISTICS:\n");
-    P.getActions().PrintStats();
-    Context.PrintStats();
-    Decl::PrintStats();
-    Stmt::PrintStats();
-    Consumer->PrintStats();
-    
-    Decl::CollectingStats(false);
-    Stmt::CollectingStats(false);
-  }
-  
-  delete Consumer;
-}

Copied: cfe/trunk/Sema/ParseAST.cpp (from r46785, cfe/trunk/Sema/ASTStreamer.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/ParseAST.cpp?p2=cfe/trunk/Sema/ParseAST.cpp&p1=cfe/trunk/Sema/ASTStreamer.cpp&r1=46785&r2=46786&rev=46786&view=diff

==============================================================================
--- cfe/trunk/Sema/ASTStreamer.cpp (original)
+++ cfe/trunk/Sema/ParseAST.cpp Tue Feb  5 18:23:21 2008
@@ -1,4 +1,4 @@
-//===--- ASTStreamer.cpp - Provide streaming interface to ASTs ------------===//
+//===--- ParseAST.cpp - Provide the clang::ParseAST method ----------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,11 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the ASTStreamer interface.
+// This file implements the clang::ParseAST method.
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Sema/ASTStreamer.h"
+#include "clang/Sema/ParseAST.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTConsumer.h"
 #include "Sema.h"

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=46786&r1=46785&r2=46786&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Tue Feb  5 18:23:21 2008
@@ -82,8 +82,8 @@
 		DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */; };
 		DE67E7150C020EDF00F66BC5 /* Sema.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7140C020EDF00F66BC5 /* Sema.h */; };
 		DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7160C020EE400F66BC5 /* Sema.cpp */; };
-		DE67E71A0C020F4F00F66BC5 /* ASTStreamer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7190C020F4F00F66BC5 /* ASTStreamer.cpp */; };
-		DE67E7280C02109800F66BC5 /* ASTStreamer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7270C02109800F66BC5 /* ASTStreamer.h */; };
+		DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */; };
+		DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE67E7270C02109800F66BC5 /* ParseAST.h */; };
 		DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* RecordLayout.h */; };
 		DE6954640C5121BD00A5826B /* Token.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6954630C5121BD00A5826B /* Token.h */; };
 		DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; };
@@ -196,7 +196,7 @@
 				1A30A9E90B93A4C800201A91 /* ExprCXX.h in CopyFiles */,
 				1A869A700BA2164C008DA07A /* LiteralSupport.h in CopyFiles */,
 				DE67E7150C020EDF00F66BC5 /* Sema.h in CopyFiles */,
-				DE67E7280C02109800F66BC5 /* ASTStreamer.h in CopyFiles */,
+				DE67E7280C02109800F66BC5 /* ParseAST.h in CopyFiles */,
 				DE928B200C0565B000231DA4 /* ModuleBuilder.h in CopyFiles */,
 				DE928B7D0C0A615100231DA4 /* CodeGenModule.h in CopyFiles */,
 				DE928B810C0A615B00231DA4 /* CodeGenFunction.h in CopyFiles */,
@@ -317,8 +317,8 @@
 		DE67E7120C020ED900F66BC5 /* SemaDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDecl.cpp; path = Sema/SemaDecl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		DE67E7140C020EDF00F66BC5 /* Sema.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Sema.h; path = Sema/Sema.h; sourceTree = "<group>"; };
 		DE67E7160C020EE400F66BC5 /* Sema.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Sema.cpp; path = Sema/Sema.cpp; sourceTree = "<group>"; };
-		DE67E7190C020F4F00F66BC5 /* ASTStreamer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ASTStreamer.cpp; path = Sema/ASTStreamer.cpp; sourceTree = "<group>"; };
-		DE67E7270C02109800F66BC5 /* ASTStreamer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ASTStreamer.h; path = clang/Sema/ASTStreamer.h; sourceTree = "<group>"; };
+		DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParseAST.cpp; path = Sema/ParseAST.cpp; sourceTree = "<group>"; };
+		DE67E7270C02109800F66BC5 /* ParseAST.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParseAST.h; path = clang/Sema/ParseAST.h; sourceTree = "<group>"; };
 		DE6951C60C4D1F5D00A5826B /* RecordLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = RecordLayout.h; path = clang/AST/RecordLayout.h; sourceTree = "<group>"; };
 		DE6954630C5121BD00A5826B /* Token.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Token.h; sourceTree = "<group>"; };
 		DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclObjC.cpp; path = Sema/SemaDeclObjC.cpp; sourceTree = "<group>"; };
@@ -544,7 +544,7 @@
 		DE67E7070C020EAB00F66BC5 /* Sema */ = {
 			isa = PBXGroup;
 			children = (
-				DE67E7190C020F4F00F66BC5 /* ASTStreamer.cpp */,
+				DE67E7190C020F4F00F66BC5 /* ParseAST.cpp */,
 				DE67E7140C020EDF00F66BC5 /* Sema.h */,
 				35A2B8610CF8FFA300E6C317 /* SemaUtil.h */,
 				DE67E7160C020EE400F66BC5 /* Sema.cpp */,
@@ -563,7 +563,7 @@
 		DE67E7260C02108300F66BC5 /* Sema */ = {
 			isa = PBXGroup;
 			children = (
-				DE67E7270C02109800F66BC5 /* ASTStreamer.h */,
+				DE67E7270C02109800F66BC5 /* ParseAST.h */,
 			);
 			name = Sema;
 			sourceTree = "<group>";
@@ -859,7 +859,7 @@
 				DE67E7110C020ED400F66BC5 /* SemaExpr.cpp in Sources */,
 				DE67E7130C020ED900F66BC5 /* SemaDecl.cpp in Sources */,
 				DE67E7170C020EE400F66BC5 /* Sema.cpp in Sources */,
-				DE67E71A0C020F4F00F66BC5 /* ASTStreamer.cpp in Sources */,
+				DE67E71A0C020F4F00F66BC5 /* ParseAST.cpp in Sources */,
 				DE06756C0C051CFE00EBBFD8 /* ParseExprCXX.cpp in Sources */,
 				DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */,
 				DE928B7F0C0A615600231DA4 /* CodeGenModule.cpp in Sources */,

Removed: cfe/trunk/include/clang/Sema/ASTStreamer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/ASTStreamer.h?rev=46785&view=auto

==============================================================================
--- cfe/trunk/include/clang/Sema/ASTStreamer.h (original)
+++ cfe/trunk/include/clang/Sema/ASTStreamer.h (removed)
@@ -1,29 +0,0 @@
-//===--- ASTStreamer.h - Stream ASTs for top-level decls --------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the ASTStreamer interface.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_ASTSTREAMER_H
-#define LLVM_CLANG_AST_ASTSTREAMER_H
-
-namespace clang {
-  class Preprocessor;
-  class ASTContext;
-  class Decl;
-  class ASTConsumer;
-  
-  /// ParseAST - Parse the entire file specified, notifying the ASTConsumer as
-  /// the file is parsed.  This takes ownership of the ASTConsumer and
-  /// ultimately deletes it.
-  void ParseAST(Preprocessor &pp, ASTConsumer *C, bool PrintStats = false);
-}  // end namespace clang
-
-#endif

Added: cfe/trunk/include/clang/Sema/ParseAST.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/ParseAST.h?rev=46786&view=auto

==============================================================================
--- cfe/trunk/include/clang/Sema/ParseAST.h (added)
+++ cfe/trunk/include/clang/Sema/ParseAST.h Tue Feb  5 18:23:21 2008
@@ -0,0 +1,27 @@
+//===--- ParseAST.h - Define the ParseAST method ----------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+//  This file defines the clang::ParseAST method.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_SEMA_PARSEAST_H
+#define LLVM_CLANG_SEMA_PARSEAST_H
+
+namespace clang {
+  class Preprocessor;
+  class ASTConsumer;
+  
+  /// ParseAST - Parse the entire file specified, notifying the ASTConsumer as
+  /// the file is parsed.  This takes ownership of the ASTConsumer and
+  /// ultimately deletes it.
+  void ParseAST(Preprocessor &pp, ASTConsumer *C, bool PrintStats = false);
+}  // end namespace clang
+
+#endif





More information about the cfe-commits mailing list