llvm::BitstreamCursor &SLocCursorForID(unsigned ID);
bool ParseLanguageOptions(const llvm::SmallVectorImpl<uint64_t> &Record);
- typedef std::pair<llvm::BitstreamCursor &, uint64_t> RecordLocation;
+ typedef std::pair<llvm::BitstreamCursor *, uint64_t> RecordLocation;
QualType ReadTypeRecord(unsigned Index);
RecordLocation 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..
/// 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.
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);