summaryrefslogtreecommitdiff
path: root/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-23 00:42:06 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-23 00:42:06 +0000
commitea703f1218971511181765c37073c03e1437c5cc (patch)
treed539d4fe89c185484fa0c1185878912eaed843f3 /lib/Basic/SourceManager.cpp
parent96888cc2515e55c9b5dd6798063bf4be2c22983a (diff)
downloadclang-ea703f1218971511181765c37073c03e1437c5cc.tar.gz
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
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r--lib/Basic/SourceManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 8dfc5d100e..23a01c953a 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