[cfe-commits] r108959 - in /cfe/trunk: include/clang/Frontend/PCHReader.h lib/Frontend/PCHReader.cpp lib/Frontend/PCHReaderDecl.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Jul 20 15:55:31 PDT 2010
Author: cornedbee
Date: Tue Jul 20 17:55:31 2010
New Revision: 108959
URL: http://llvm.org/viewvc/llvm-project?rev=108959&view=rev
Log:
Apparently not every system thinks that references in pairs are as cool as I think.
Modified:
cfe/trunk/include/clang/Frontend/PCHReader.h
cfe/trunk/lib/Frontend/PCHReader.cpp
cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
Modified: cfe/trunk/include/clang/Frontend/PCHReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PCHReader.h?rev=108959&r1=108958&r2=108959&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/PCHReader.h (original)
+++ cfe/trunk/include/clang/Frontend/PCHReader.h Tue Jul 20 17:55:31 2010
@@ -543,7 +543,7 @@
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);
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=108959&r1=108958&r2=108959&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Tue Jul 20 17:55:31 2010
@@ -2160,7 +2160,7 @@
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 @@
/// 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.
Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=108959&r1=108958&r2=108959&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Tue Jul 20 17:55:31 2010
@@ -1264,13 +1264,13 @@
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);
More information about the cfe-commits
mailing list