llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: None (llvmbot) <details> <summary>Changes</summary> Backport ada79f4 Requested by: @<!-- -->jansvoboda11 --- Full diff: https://github.com/llvm/llvm-project/pull/177383.diff 1 Files Affected: - (modified) clang/lib/Serialization/ModuleManager.cpp (+5-5) ``````````diff diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp index 236fe20fdad7c..dad6840947ece 100644 --- a/clang/lib/Serialization/ModuleManager.cpp +++ b/clang/lib/Serialization/ModuleManager.cpp @@ -105,6 +105,10 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type, std::string &ErrorStr) { Module = nullptr; + uint64_t InputFilesValidationTimestamp = 0; + if (Type == MK_ImplicitModule) + InputFilesValidationTimestamp = ModCache.getModuleTimestamp(FileName); + // Look for the file entry. This only fails if the expected size or // modification time differ. OptionalFileEntryRef Entry; @@ -172,11 +176,7 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type, NewModule->Index = Chain.size(); NewModule->FileName = FileName.str(); NewModule->ImportLoc = ImportLoc; - NewModule->InputFilesValidationTimestamp = 0; - - if (NewModule->Kind == MK_ImplicitModule) - NewModule->InputFilesValidationTimestamp = - ModCache.getModuleTimestamp(NewModule->FileName); + NewModule->InputFilesValidationTimestamp = InputFilesValidationTimestamp; // Load the contents of the module if (std::unique_ptr<llvm::MemoryBuffer> Buffer = lookupBuffer(FileName)) { `````````` </details> https://github.com/llvm/llvm-project/pull/177383 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
