mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
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
This commit is contained in:
@@ -6147,8 +6147,8 @@ std::error_code ModuleSummaryIndexBitcodeReader::parseModule() {
|
||||
if (!TheIndex)
|
||||
break;
|
||||
if (TheIndex->modulePaths().empty())
|
||||
// Does not have any summary emitted.
|
||||
break;
|
||||
// We always seed the index with the module.
|
||||
TheIndex->addModulePath(Buffer->getBufferIdentifier(), 0);
|
||||
if (TheIndex->modulePaths().size() != 1)
|
||||
return error("Don't expect multiple modules defined?");
|
||||
auto &Hash = TheIndex->modulePaths().begin()->second.second;
|
||||
|
||||
Reference in New Issue
Block a user