[cfe-commits] r107470 - /cfe/trunk/lib/Frontend/PCHReader.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jul 2 04:55:05 PDT 2010
Author: akirtzidis
Date: Fri Jul 2 06:55:05 2010
New Revision: 107470
URL: http://llvm.org/viewvc/llvm-project?rev=107470&view=rev
Log:
Fix broken reading of "#lines" from PCH.
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=107470&r1=107469&r2=107470&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Fri Jul 2 06:55:05 2010
@@ -659,16 +659,17 @@
// Parse the line entries
std::vector<LineEntry> Entries;
while (Idx < Record.size()) {
- int FID = FileIDs[Record[Idx++]];
+ int FID = Record[Idx++];
// Extract the line entries
unsigned NumEntries = Record[Idx++];
+ assert(NumEntries && "Numentries is 00000");
Entries.clear();
Entries.reserve(NumEntries);
for (unsigned I = 0; I != NumEntries; ++I) {
unsigned FileOffset = Record[Idx++];
unsigned LineNo = Record[Idx++];
- int FilenameID = Record[Idx++];
+ int FilenameID = FileIDs[Record[Idx++]];
SrcMgr::CharacteristicKind FileKind
= (SrcMgr::CharacteristicKind)Record[Idx++];
unsigned IncludeOffset = Record[Idx++];
More information about the cfe-commits
mailing list