diff options
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llvm-lto/llvm-lto.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp index 86cdf9b6b3e..27e5c5e122c 100644 --- a/llvm/tools/llvm-lto/llvm-lto.cpp +++ b/llvm/tools/llvm-lto/llvm-lto.cpp @@ -331,12 +331,9 @@ static void createCombinedModuleSummaryIndex() { uint64_t NextModuleId = 0; for (auto &Filename : InputFilenames) { ExitOnError ExitOnErr("llvm-lto: error loading file '" + Filename + "': "); - std::unique_ptr<ModuleSummaryIndex> Index = - ExitOnErr(llvm::getModuleSummaryIndexForFile(Filename)); - // Skip files without a module summary. - if (!Index) - continue; - CombinedIndex.mergeFrom(std::move(Index), ++NextModuleId); + std::unique_ptr<MemoryBuffer> MB = + ExitOnErr(errorOrToExpected(MemoryBuffer::getFileOrSTDIN(Filename))); + ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, ++NextModuleId)); } std::error_code EC; assert(!OutputFilename.empty()); |

