diff options
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
| -rw-r--r-- | llvm/lib/LTO/LTO.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 94a4abfb896..8d23f53eae6 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -542,8 +542,12 @@ public: }; auto ModuleID = MBRef.getBufferIdentifier(); - if (!Cache || !CombinedIndex.modulePaths().count(ModuleID)) - // Cache disabled or no entry for this module in the combined index + + if (!Cache || !CombinedIndex.modulePaths().count(ModuleID) || + all_of(CombinedIndex.getModuleHash(ModuleID), + [](uint32_t V) { return V == 0; })) + // Cache disabled or no entry for this module in the combined index or + // no module hash. return RunThinBackend(AddStream); SmallString<40> Key; |

