forked from OSchip/llvm-project
Apparently not every system thinks that references in pairs are as cool as I think.
llvm-svn: 108959
This commit is contained in:
parent
ede0585ec2
commit
b2831dbff7
|
@ -543,7 +543,7 @@ private:
|
||||||
llvm::BitstreamCursor &SLocCursorForID(unsigned ID);
|
llvm::BitstreamCursor &SLocCursorForID(unsigned ID);
|
||||||
bool ParseLanguageOptions(const llvm::SmallVectorImpl<uint64_t> &Record);
|
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);
|
QualType ReadTypeRecord(unsigned Index);
|
||||||
RecordLocation TypeCursorForIndex(unsigned Index);
|
RecordLocation TypeCursorForIndex(unsigned Index);
|
||||||
|
|
|
@ -2160,7 +2160,7 @@ PCHReader::RecordLocation PCHReader::TypeCursorForIndex(unsigned Index) {
|
||||||
Index -= F->LocalNumTypes;
|
Index -= F->LocalNumTypes;
|
||||||
}
|
}
|
||||||
assert(F && F->LocalNumTypes > Index && "Broken chain");
|
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..
|
/// \brief Read and return the type with the given index..
|
||||||
|
@ -2171,7 +2171,7 @@ PCHReader::RecordLocation PCHReader::TypeCursorForIndex(unsigned Index) {
|
||||||
/// IDs.
|
/// IDs.
|
||||||
QualType PCHReader::ReadTypeRecord(unsigned Index) {
|
QualType PCHReader::ReadTypeRecord(unsigned Index) {
|
||||||
RecordLocation Loc = TypeCursorForIndex(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
|
// Keep track of where we are in the stream, then jump back there
|
||||||
// after reading this type.
|
// after reading this type.
|
||||||
|
|
|
@ -1264,13 +1264,13 @@ PCHReader::RecordLocation PCHReader::DeclCursorForIndex(unsigned Index) {
|
||||||
Index -= F->LocalNumDecls;
|
Index -= F->LocalNumDecls;
|
||||||
}
|
}
|
||||||
assert(F && F->LocalNumDecls > Index && "Broken chain");
|
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.
|
/// \brief Read the declaration at the given offset from the PCH file.
|
||||||
Decl *PCHReader::ReadDeclRecord(unsigned Index) {
|
Decl *PCHReader::ReadDeclRecord(unsigned Index) {
|
||||||
RecordLocation Loc = DeclCursorForIndex(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
|
// Keep track of where we are in the stream, then jump back there
|
||||||
// after reading this declaration.
|
// after reading this declaration.
|
||||||
SavedStreamPosition SavedPosition(DeclsCursor);
|
SavedStreamPosition SavedPosition(DeclsCursor);
|
||||||
|
|
Loading…
Reference in New Issue