[cfe-commits] r73931 - /cfe/trunk/lib/Basic/SourceManager.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Mon Jun 22 17:42:06 PDT 2009
Author: akirtzidis
Date: Mon Jun 22 19:42:06 2009
New Revision: 73931
URL: http://llvm.org/viewvc/llvm-project?rev=73931&view=rev
Log:
In SourceManager::createFileID missed setting ContentCache's FirstFID in another place.
Modified:
cfe/trunk/lib/Basic/SourceManager.cpp
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=73931&r1=73930&r2=73931&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Mon Jun 22 19:42:06 2009
@@ -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
More information about the cfe-commits
mailing list