summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-05-01 22:04:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-05-01 22:04:36 +0000
commit74d22dd7dc608675486f166918b4d4369d79c88b (patch)
tree52b89971135c28dae9a2be39c73765a79a2a3c76 /llvm/tools
parent864a363e8f4e2ea59cd4c9a6561ab0707546f6ce (diff)
downloadbcm5719-llvm-74d22dd7dc608675486f166918b4d4369d79c88b.tar.gz
bcm5719-llvm-74d22dd7dc608675486f166918b4d4369d79c88b.zip
Bitcode: Make the summary reader responsible for merging. NFCI.
This is to prepare for an upcoming change which uses pointers instead of GUIDs to represent references. Differential Revision: https://reviews.llvm.org/D32469 llvm-svn: 301843
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp9
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());
OpenPOWER on IntegriCloud