Skip to content

Commit

Permalink
[ThinLTO] Make llvm-lto module ID numbering consistent with linkers
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332476 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
teresajohnson committed May 16, 2018
1 parent db6ccb3 commit f90a5e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/llvm-lto/llvm-lto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit f90a5e0

Please sign in to comment.