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 llvm-svn: 283654
This commit is contained in:
1 parent
01e0e136bd
commit
00fa1409ec
7 files changed
+66
-16
No files matched your search
@@ -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