summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-27 07:35:40 +0000
committerChris Lattner <sabre@nondot.org>2009-04-27 07:35:40 +0000
commit72405d6ec24cdf56d147f88afd33703df4cbf0ea (patch)
tree37765d29b124cbfc513ad33effbb05831f79a180 /clang/lib/Frontend/PCHReader.cpp
parente15bf109befb9d32669e2f4e79b15c931dd3ad67 (diff)
downloadbcm5719-llvm-72405d6ec24cdf56d147f88afd33703df4cbf0ea.tar.gz
bcm5719-llvm-72405d6ec24cdf56d147f88afd33703df4cbf0ea.zip
fix a couple more places that should be using the DeclCursor instead
of the normal stream cursor. llvm-svn: 70198
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index ff8795ca640..bace23ccc62 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -1411,14 +1411,14 @@ bool PCHReader::ReadDeclsLexicallyInContext(DeclContext *DC,
// 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::ReadDeclsLexicallyInContext(DeclContext *DC,
}
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 @@ bool PCHReader::ReadDeclsVisibleInContext(DeclContext *DC,
// 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 @@ bool PCHReader::ReadDeclsVisibleInContext(DeclContext *DC,
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++]);
OpenPOWER on IntegriCloud