]> granicus.if.org Git - clang/commitdiff
rename GetStmt -> GetDeclStmt to make it clear that the stmt read
authorChris Lattner <sabre@nondot.org>
Mon, 27 Apr 2009 05:46:25 +0000 (05:46 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 27 Apr 2009 05:46:25 +0000 (05:46 +0000)
is part of a decl.

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

include/clang/AST/Decl.h
include/clang/AST/ExternalASTSource.h
include/clang/Frontend/PCHReader.h
lib/Frontend/PCHReader.cpp

index da3459a0166efee53d16858677357ef7f190677c..1aabf7d3e6232ea9991567123ab54c35f93cc085 100644 (file)
@@ -498,7 +498,7 @@ private:
   /// 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
index ef097709333d6a3c88b279d20d08251c2f9ae95c..db8a97034fc4f2b34479b651b69c12917b59b0b4 100644 (file)
@@ -65,12 +65,13 @@ public:
   /// 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 @@ public:
 };
 
 /// \brief A lazy pointer to a statement.
-typedef LazyOffsetPtr<Stmt, &ExternalASTSource::GetStmt> LazyStmtPtr;
+typedef LazyOffsetPtr<Stmt, &ExternalASTSource::GetDeclStmt> LazyDeclStmtPtr;
 
 } // end namespace clang
 
index b9edd8ff83861203f98f826fbfcaaa5e525da3a8..5e75f720614d7973a1f8268a334304f69650361b 100644 (file)
@@ -288,8 +288,8 @@ public:
   ///
   /// 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
index 4ea1e05b8873e674c9c8a498d599e28c5d50fba3..4ec2a3a18aaf6d347c433c621f58898a1c48d80b 100644 (file)
@@ -1331,7 +1331,12 @@ Decl *PCHReader::GetDecl(pch::DeclID ID) {
   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);