aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/PCHReader.cpp4
-rw-r--r--lib/Frontend/PCHReaderDecl.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index 532ba444a2..008f58eaea 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -2160,7 +2160,7 @@ PCHReader::RecordLocation PCHReader::TypeCursorForIndex(unsigned Index) {
Index -= F->LocalNumTypes;
}
assert(F && F->LocalNumTypes > Index && "Broken chain");
- return RecordLocation(F->DeclsCursor, F->TypeOffsets[Index]);
+ return RecordLocation(&F->DeclsCursor, F->TypeOffsets[Index]);
}
/// \brief Read and return the type with the given index..
@@ -2171,7 +2171,7 @@ PCHReader::RecordLocation PCHReader::TypeCursorForIndex(unsigned Index) {
/// IDs.
QualType PCHReader::ReadTypeRecord(unsigned Index) {
RecordLocation Loc = TypeCursorForIndex(Index);
- llvm::BitstreamCursor &DeclsCursor = Loc.first;
+ llvm::BitstreamCursor &DeclsCursor = *Loc.first;
// Keep track of where we are in the stream, then jump back there
// after reading this type.
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index a4c0d8df9a..8ea75b7270 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -1264,13 +1264,13 @@ PCHReader::RecordLocation PCHReader::DeclCursorForIndex(unsigned Index) {
Index -= F->LocalNumDecls;
}
assert(F && F->LocalNumDecls > Index && "Broken chain");
- return RecordLocation(F->DeclsCursor, F->DeclOffsets[Index]);
+ return RecordLocation(&F->DeclsCursor, F->DeclOffsets[Index]);
}
/// \brief Read the declaration at the given offset from the PCH file.
Decl *PCHReader::ReadDeclRecord(unsigned Index) {
RecordLocation Loc = DeclCursorForIndex(Index);
- llvm::BitstreamCursor &DeclsCursor = Loc.first;
+ llvm::BitstreamCursor &DeclsCursor = *Loc.first;
// Keep track of where we are in the stream, then jump back there
// after reading this declaration.
SavedStreamPosition SavedPosition(DeclsCursor);