From 0152c6cbcad16227595db0ae16a04dfef4b6de0b Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 23 Jun 2009 00:42:06 +0000 Subject: In SourceManager::createFileID missed setting ContentCache's FirstFID in another place. llvm-svn: 73931 --- clang/lib/Basic/SourceManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Basic/SourceManager.cpp') diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 8dfc5d1..23a01c9 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/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 -- cgit v1.1