Apparently not every system thinks that references in pairs are as cool as I think.

llvm-svn: 108959
This commit is contained in:
Sebastian Redl 2010-07-20 22:55:31 +00:00
parent ede0585ec2
commit b2831dbff7
3 changed files with 5 additions and 5 deletions

View File

@ -543,7 +543,7 @@ private:
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);

View File

@ -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.

View File

@ -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);