]> granicus.if.org Git - clang/commitdiff
Remove PCHReader::getStream(), it was unused. Inline PCHReader::getDelsCursor() into...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 19 Jul 2010 22:38:35 +0000 (22:38 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 19 Jul 2010 22:38:35 +0000 (22:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108763 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/PCHReader.h
lib/Frontend/PCHReaderDecl.cpp

index 9002c169b54cfdfa3fa9d5074a8f3e094587bc57..79682edbf2a8952af2b85ad56b7a317761f9f296 100644 (file)
@@ -64,6 +64,7 @@ class Preprocessor;
 class Sema;
 class SwitchCase;
 class PCHReader;
+class PCHDeclReader;
 struct HeaderFileInfo;
 
 struct PCHPredefinesBlock {
@@ -169,6 +170,7 @@ class PCHReader
 public:
   enum PCHReadResult { Success, Failure, IgnorePCH };
   friend class PCHValidator;
+  friend class PCHDeclReader;
 private:
   /// \brief The receiver of some callbacks invoked by PCHReader.
   llvm::OwningPtr<PCHReaderListener> Listener;
@@ -866,10 +868,6 @@ public:
   /// imported.
   Sema *getSema() { return SemaObj; }
 
-  /// \brief Retrieve the stream that this PCH reader is reading from.
-  llvm::BitstreamCursor &getStream() { return Chain[0]->Stream; }
-  llvm::BitstreamCursor &getDeclsCursor() { return Chain[0]->DeclsCursor; }
-
   /// \brief Retrieve the identifier table associated with the
   /// preprocessor.
   IdentifierTable &getIdentifierTable();
index e494f7c9345f191953d178f70c5dd5797ab48f5a..0231fa66a952b4e6a13dd73e6ced95bd7cce18d6 100644 (file)
@@ -117,7 +117,7 @@ void PCHDeclReader::Visit(Decl *D) {
   } else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
     // FunctionDecl's body was written last after all other Stmts/Exprs.
     if (Record[Idx++])
-      FD->setLazyBody(Reader.getDeclsCursor().GetCurrentBitNo());
+      FD->setLazyBody(Reader.Chain[0]->DeclsCursor.GetCurrentBitNo());
   }
 }