entries of the same file.
This can happen because the file was "included" multiple times and is
referenced by multiple SLocEntries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169829
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!Cache->OrigEntry)
continue;
+ uint32_t &InputFileID = InputFileIDs[Cache->OrigEntry];
+ if (InputFileID != 0)
+ continue; // already recorded this file.
+
// Record this entry's offset.
InputFileOffsets.push_back(Stream.GetCurrentBitNo());
- InputFileIDs[Cache->OrigEntry] = InputFileOffsets.size();
+
+ InputFileID = InputFileOffsets.size();
Record.clear();
Record.push_back(INPUT_FILE);