[cfe-commits] r70189 - in /cfe/trunk: include/clang/AST/Decl.h include/clang/AST/ExternalASTSource.h include/clang/Frontend/PCHReader.h lib/Frontend/PCHReader.cpp

Chris Lattner sabre at nondot.org
Sun Apr 26 22:46:25 PDT 2009


Author: lattner
Date: Mon Apr 27 00:46:25 2009
New Revision: 70189

URL: http://llvm.org/viewvc/llvm-project?rev=70189&view=rev
Log:
rename GetStmt -> GetDeclStmt to make it clear that the stmt read
is part of a decl.

Modified:
    cfe/trunk/include/clang/AST/Decl.h
    cfe/trunk/include/clang/AST/ExternalASTSource.h
    cfe/trunk/include/clang/Frontend/PCHReader.h
    cfe/trunk/lib/Frontend/PCHReader.cpp

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=70189&r1=70188&r2=70189&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Mon Apr 27 00:46:25 2009
@@ -498,7 +498,7 @@
   /// FunctionDecl object to save an allocation like FunctionType does.
   ParmVarDecl **ParamInfo;
   
-  LazyStmtPtr Body;
+  LazyDeclStmtPtr Body;
   
   /// PreviousDeclaration - A link to the previous declaration of this
   /// same function, NULL if this is the first declaration. For

Modified: cfe/trunk/include/clang/AST/ExternalASTSource.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExternalASTSource.h?rev=70189&r1=70188&r2=70189&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ExternalASTSource.h (original)
+++ cfe/trunk/include/clang/AST/ExternalASTSource.h Mon Apr 27 00:46:25 2009
@@ -65,12 +65,13 @@
   /// building a new declaration.
   virtual Decl *GetDecl(unsigned ID) = 0;
 
-  /// \brief Resolve the offset of a statement into a statement.
+  /// \brief Resolve the offset of a statement in the decl stream into a
+  /// statement.
   ///
   /// This operation will read a new statement from the external
   /// source each time it is called, and is meant to be used via a
   /// LazyOffsetPtr.
-  virtual Stmt *GetStmt(uint64_t Offset) = 0;
+  virtual Stmt *GetDeclStmt(uint64_t Offset) = 0;
 
   /// \brief Read all of the declarations lexically stored in a
   /// declaration context.
@@ -176,7 +177,7 @@
 };
 
 /// \brief A lazy pointer to a statement.
-typedef LazyOffsetPtr<Stmt, &ExternalASTSource::GetStmt> LazyStmtPtr;
+typedef LazyOffsetPtr<Stmt, &ExternalASTSource::GetDeclStmt> LazyDeclStmtPtr;
 
 } // end namespace clang
 

Modified: cfe/trunk/include/clang/Frontend/PCHReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PCHReader.h?rev=70189&r1=70188&r2=70189&view=diff

==============================================================================
--- cfe/trunk/include/clang/Frontend/PCHReader.h (original)
+++ cfe/trunk/include/clang/Frontend/PCHReader.h Mon Apr 27 00:46:25 2009
@@ -288,8 +288,8 @@
   ///
   /// This operation will read a new statement from the external
   /// source each time it is called, and is meant to be used via a
-  /// LazyOffsetPtr.
-  virtual Stmt *GetStmt(uint64_t Offset);
+  /// LazyOffsetPtr (which is used by Decls for the body of functions, etc).
+  virtual Stmt *GetDeclStmt(uint64_t Offset);
 
   /// ReadBlockAbbrevs - Enter a subblock of the specified BlockID with the
   /// specified cursor.  Read the abbreviations that are at the top of the block

Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=70189&r1=70188&r2=70189&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Mon Apr 27 00:46:25 2009
@@ -1331,7 +1331,12 @@
   return DeclsLoaded[Index];
 }
 
-Stmt *PCHReader::GetStmt(uint64_t Offset) {
+/// \brief Resolve the offset of a statement into a statement.
+///
+/// This operation will read a new statement from the external
+/// source each time it is called, and is meant to be used via a
+/// LazyOffsetPtr (which is used by Decls for the body of functions, etc).
+Stmt *PCHReader::GetDeclStmt(uint64_t Offset) {
   // Keep track of where we are in the stream, then jump back there
   // after reading this declaration.
   SavedStreamPosition SavedPosition(Stream);





More information about the cfe-commits mailing list