]> granicus.if.org Git - clang/commitdiff
Adjust to LLVM API changes that went into r70157.
authorChris Lattner <sabre@nondot.org>
Sun, 26 Apr 2009 20:59:20 +0000 (20:59 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 26 Apr 2009 20:59:20 +0000 (20:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70158 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 8f53405c52a84257d43c00ed919c4010d4f8203c..90f79b86f368782381ced536432c7ef9ffadcf66 100644 (file)
@@ -86,7 +86,8 @@ private:
   ASTConsumer *Consumer;
 
   /// \brief The bitstream reader from which we'll read the PCH file.
-  llvm::BitstreamReader Stream;
+  llvm::BitstreamReader StreamFile;
+  llvm::BitstreamCursor Stream;    
 
   /// \brief The file name of the PCH file.
   std::string FileName;
@@ -422,7 +423,7 @@ public:
   Sema *getSema() { return SemaObj; }
 
   /// \brief Retrieve the stream that this PCH reader is reading from.
-  llvm::BitstreamReader &getStream() { return Stream; }
+  llvm::BitstreamCursor &getStream() { return Stream; }
 
   /// \brief Retrieve the identifier table associated with the
   /// preprocessor.
index c2d50ce9fc3fb8c0bc73f9d8629b244139ceade6..375fcdddf545a9f50676fba7c4e9d7e13fa9567f 100644 (file)
@@ -41,15 +41,15 @@ namespace {
   /// \brief Helper class that saves the current stream position and
   /// then restores it when destroyed.
   struct VISIBILITY_HIDDEN SavedStreamPosition {
-    explicit SavedStreamPosition(llvm::BitstreamReader &Stream)
-      : Stream(Stream), Offset(Stream.GetCurrentBitNo()) { }
+    explicit SavedStreamPosition(llvm::BitstreamCursor &Cursor)
+      : Cursor(Cursor), Offset(Cursor.GetCurrentBitNo()) { }
 
     ~SavedStreamPosition() {
-      Stream.JumpToBit(Offset);
+      Cursor.JumpToBit(Offset);
     }
 
   private:
-    llvm::BitstreamReader &Stream;
+    llvm::BitstreamCursor &Cursor;
     uint64_t Offset;
   };
 }
@@ -1974,8 +1974,9 @@ PCHReader::PCHReadResult PCHReader::ReadPCH(const std::string &FileName) {
   }
 
   // Initialize the stream
-  Stream.init((const unsigned char *)Buffer->getBufferStart(), 
-              (const unsigned char *)Buffer->getBufferEnd());
+  StreamFile.init((const unsigned char *)Buffer->getBufferStart(), 
+                  (const unsigned char *)Buffer->getBufferEnd());
+  Stream.init(StreamFile);
 
   // Sniff for the signature.
   if (Stream.Read(8) != 'C' ||