diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
commit | d6aff018d446f22be4e4e0277080ebfa5b157288 (patch) | |
tree | 64b43af65e97f7659637c9ac028e39af2e26b841 /lib/Basic/SourceManager.cpp | |
parent | b897c8660c4ff7037dde81b9645737bc1c992abe (diff) |
Notes
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r-- | lib/Basic/SourceManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 8dfc5d100e859..23a01c953a46c 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -373,7 +373,10 @@ FileID SourceManager::createFileID(const ContentCache *File, // 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 |