diff options
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
-rw-r--r-- | clang/lib/Serialization/ModuleManager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp index e3d7ff4..7f3f246 100644 --- a/clang/lib/Serialization/ModuleManager.cpp +++ b/clang/lib/Serialization/ModuleManager.cpp @@ -110,10 +110,12 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type, // Look for the file entry. This only fails if the expected size or // modification time differ. OptionalFileEntryRef Entry; - const bool IgnoreModTime = - (Type == MK_ExplicitModule || Type == MK_PrebuiltModule); + bool IgnoreModTime = Type == MK_ExplicitModule || Type == MK_PrebuiltModule; + if (ImportedBy) + IgnoreModTime &= ImportedBy->Kind == MK_ExplicitModule || + ImportedBy->Kind == MK_PrebuiltModule; if (IgnoreModTime) { - // If we're not expecting to pull this file out of the module cache, it + // If neither this file nor the importer are in the module cache, this file // might have a different mtime due to being moved across filesystems in // a distributed build. The size must still match, though. (As must the // contents, but we can't check that.) |