summaryrefslogtreecommitdiffstats
path: root/clang/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
commit0152c6cbcad16227595db0ae16a04dfef4b6de0b (patch)
treefd0dcce814aec47b835334ab018464c68cb0c47e /clang/lib/Basic/SourceManager.cpp
parent53aeec3b14a8f0bac18e9cf6305a9013efee4036 (diff)
downloadbcm5719-llvm-0152c6cbcad16227595db0ae16a04dfef4b6de0b.tar.gz
bcm5719-llvm-0152c6cbcad16227595db0ae16a04dfef4b6de0b.zip
In SourceManager::createFileID missed setting ContentCache's FirstFID in another place.
llvm-svn: 73931
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 8dfc5d100e8..23a01c953a4 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
OpenPOWER on IntegriCloud