diff options
Diffstat (limited to 'Basic/SourceManager.cpp')
-rw-r--r-- | Basic/SourceManager.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Basic/SourceManager.cpp b/Basic/SourceManager.cpp index bfa77923b0..22a7cf511f 100644 --- a/Basic/SourceManager.cpp +++ b/Basic/SourceManager.cpp @@ -441,10 +441,14 @@ void ContentCache::ReadToSourceManager(llvm::Deserializer& D, const char* start = &Buf[0]; const FileEntry* E = FMgr->getFile(start,start+Buf.size()); - assert (E && "Not yet supported: missing files."); - - // Get the ContextCache object and register it with the deserializer. - D.RegisterPtr(PtrID,SMgr.getContentCache(E)); + // FIXME: Ideally we want a lazy materialization of the ContentCache + // anyway, because we don't want to read in source files unless this + // is absolutely needed. + if (!E) + D.RegisterPtr(PtrID,NULL); + else + // Get the ContextCache object and register it with the deserializer. + D.RegisterPtr(PtrID,SMgr.getContentCache(E)); } else { // Register the ContextCache object with the deserializer. |