[cfe-commits] r169829 - /cfe/trunk/lib/Serialization/ASTWriter.cpp
akyrtzi at gmail.com
Mon Dec 10 23:48:08 PST 2012
Date: Tue Dec 11 01:48:08 2012
New Revision: 169829
[PCH] When writing out the list of input files, avoid emitting duplicate
entries of the same file.
This can happen because the file was "included" multiple times and is
referenced by multiple SLocEntries.
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Tue Dec 11 01:48:08 2012
@@ -1235,9 +1235,14 @@
+ uint32_t &InputFileID = InputFileIDs[Cache->OrigEntry];
+ if (InputFileID != 0)
+ continue; // already recorded this file.
// Record this entry's offset.
- InputFileIDs[Cache->OrigEntry] = InputFileOffsets.size();
+ InputFileID = InputFileOffsets.size();
More information about the cfe-commits