[cfe-commits] r70198 - /cfe/trunk/lib/Frontend/PCHReader.cpp
Chris Lattner
sabre at nondot.org
Mon Apr 27 00:35:42 PDT 2009
Author: lattner
Date: Mon Apr 27 02:35:40 2009
New Revision: 70198
URL: http://llvm.org/viewvc/llvm-project?rev=70198&view=rev
Log:
fix a couple more places that should be using the DeclCursor instead
of the normal stream cursor.
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=70198&r1=70197&r2=70198&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Mon Apr 27 02:35:40 2009
@@ -1411,14 +1411,14 @@
// Keep track of where we are in the stream, then jump back there
// after reading this context.
- SavedStreamPosition SavedPosition(Stream);
+ SavedStreamPosition SavedPosition(DeclsCursor);
// Load the record containing all of the declarations lexically in
// this context.
- Stream.JumpToBit(Offset);
+ DeclsCursor.JumpToBit(Offset);
RecordData Record;
- unsigned Code = Stream.ReadCode();
- unsigned RecCode = Stream.ReadRecord(Code, Record);
+ unsigned Code = DeclsCursor.ReadCode();
+ unsigned RecCode = DeclsCursor.ReadRecord(Code, Record);
(void)RecCode;
assert(RecCode == pch::DECL_CONTEXT_LEXICAL && "Expected lexical block");
@@ -1430,7 +1430,7 @@
}
bool PCHReader::ReadDeclsVisibleInContext(DeclContext *DC,
- llvm::SmallVectorImpl<VisibleDeclaration> & Decls) {
+ llvm::SmallVectorImpl<VisibleDeclaration> &Decls) {
assert(DC->hasExternalVisibleStorage() &&
"DeclContext has no visible decls in storage");
uint64_t Offset = DeclContextOffsets[DC].second;
@@ -1438,14 +1438,14 @@
// Keep track of where we are in the stream, then jump back there
// after reading this context.
- SavedStreamPosition SavedPosition(Stream);
+ SavedStreamPosition SavedPosition(DeclsCursor);
// Load the record containing all of the declarations visible in
// this context.
- Stream.JumpToBit(Offset);
+ DeclsCursor.JumpToBit(Offset);
RecordData Record;
- unsigned Code = Stream.ReadCode();
- unsigned RecCode = Stream.ReadRecord(Code, Record);
+ unsigned Code = DeclsCursor.ReadCode();
+ unsigned RecCode = DeclsCursor.ReadRecord(Code, Record);
(void)RecCode;
assert(RecCode == pch::DECL_CONTEXT_VISIBLE && "Expected visible block");
if (Record.size() == 0)
@@ -1459,8 +1459,7 @@
Decls.back().Name = ReadDeclarationName(Record, Idx);
unsigned Size = Record[Idx++];
- llvm::SmallVector<unsigned, 4> & LoadedDecls
- = Decls.back().Declarations;
+ llvm::SmallVector<unsigned, 4> &LoadedDecls = Decls.back().Declarations;
LoadedDecls.reserve(Size);
for (unsigned I = 0; I < Size; ++I)
LoadedDecls.push_back(Record[Idx++]);
More information about the cfe-commits
mailing list