summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-lto/llvm-lto.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-05-16 14:58:14 +0000
committerTeresa Johnson <tejohnson@google.com>2018-05-16 14:58:14 +0000
commit43e71ec4c1401d44f68dce4b37e6ab807e85b0a8 (patch)
tree8d6c6665bcd53c69c6181811bf9130262dcfcdeb /llvm/tools/llvm-lto/llvm-lto.cpp
parent09673323aadbe52df96effe5d15f3adb5e2eb8fd (diff)
downloadbcm5719-llvm-43e71ec4c1401d44f68dce4b37e6ab807e85b0a8.tar.gz
bcm5719-llvm-43e71ec4c1401d44f68dce4b37e6ab807e85b0a8.zip
[ThinLTO] Make llvm-lto module ID numbering consistent with linkers
The module ID numbering typically starts at 0 (in both the new and old LTO APIs, used by linkers). Make llvm-lto consistent with that. Split out of D46699. llvm-svn: 332476
Diffstat (limited to 'llvm/tools/llvm-lto/llvm-lto.cpp')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index 97f022d18b1..eb8aa27b033 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -380,7 +380,7 @@ static void createCombinedModuleSummaryIndex() {
ExitOnError ExitOnErr("llvm-lto: error loading file '" + Filename + "': ");
std::unique_ptr<MemoryBuffer> MB =
ExitOnErr(errorOrToExpected(MemoryBuffer::getFileOrSTDIN(Filename)));
- ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, ++NextModuleId));
+ ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, NextModuleId++));
}
std::error_code EC;
assert(!OutputFilename.empty());
OpenPOWER on IntegriCloud