In SourceManager::createFileID missed setting ContentCache's FirstFID in another place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73931 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 8dfc5d1..23a01c9 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -373,7 +373,10 @@
// Set LastFileIDLookup to the newly created file. The next getFileID call is
// almost guaranteed to be from that file.
- return LastFileIDLookup = FileID::get(SLocEntryTable.size()-1);
+ FileID FID = FileID::get(SLocEntryTable.size()-1);
+ if (File->FirstFID.isInvalid())
+ File->FirstFID = FID;
+ return LastFileIDLookup = FID;
}
/// createInstantiationLoc - Return a new SourceLocation that encodes the fact