summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-27 21:28:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-27 21:28:04 +0000
commit0bc1293584cc02a83f57762098a9622f541f3b84 (patch)
tree96b2fade40882164aa87ab678fd1fed80eaf288e /clang/lib/Frontend/PCHReader.cpp
parent1f1e1c7e393fe8ff1dc12357b24d9b145af3ff04 (diff)
downloadbcm5719-llvm-0bc1293584cc02a83f57762098a9622f541f3b84.tar.gz
bcm5719-llvm-0bc1293584cc02a83f57762098a9622f541f3b84.zip
Be more careful in our teardown of the PCHReader after deciding to
ignore a PCH file. llvm-svn: 70251
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index d044fee4280..d36d8361fd8 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -1116,6 +1116,14 @@ PCHReader::PCHReadResult PCHReader::ReadPCH(const std::string &FileName) {
// FIXME: We could consider reading through to the end of this
// PCH block, skipping subblocks, to see if there are other
// PCH blocks elsewhere.
+
+ // Clear out any preallocated source location entries, so that
+ // the source manager does not try to resolve them later.
+ PP.getSourceManager().ClearPreallocatedSLocEntries();
+
+ // Remove the stat cache.
+ PP.getFileManager().setStatCache(0);
+
return IgnorePCH;
}
break;
OpenPOWER on IntegriCloud