diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-08 04:44:18 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-08 04:44:18 +0000 |
commit | 7fe28f81dbac2aac6789f1519d41d739636809c2 (patch) | |
tree | c8b2af80845f04f5d52bf9a0c1e3701d93a51651 /lib/LTO/ThinLTOCodeGenerator.cpp | |
parent | 7c9eed7e83a640353b2900e36838e1d130b0c1e4 (diff) |
ThinLTO: handles modules with empty summaries
We need to add an entry in the combined-index for modules that have
a hash but otherwise empty summary, this is needed so that we can
get the hash for the module.
Also, if no entry is present in the combined index for a module, we
need to skip it when trying to compute a cache entry.
Differential Revision: https://reviews.llvm.org/D25300
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO/ThinLTOCodeGenerator.cpp')
-rw-r--r-- | lib/LTO/ThinLTOCodeGenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/LTO/ThinLTOCodeGenerator.cpp b/lib/LTO/ThinLTOCodeGenerator.cpp index f4232dc2f89..8afe13d8e16 100644 --- a/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/lib/LTO/ThinLTOCodeGenerator.cpp @@ -234,6 +234,10 @@ public: if (CachePath.empty()) return; + if (!Index.modulePaths().count(ModuleID)) + // The module does not have an entry, it can't have a hash at all + return; + // Compute the unique hash for this entry // This is based on the current compiler version, the module itself, the // export list, the hash for every single module in the import list, the |