Skip to content

Commit 43e71ec

Browse files
committed
[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
1 parent 0967332 commit 43e71ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/tools/llvm-lto/llvm-lto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static void createCombinedModuleSummaryIndex() {
380380
ExitOnError ExitOnErr("llvm-lto: error loading file '" + Filename + "': ");
381381
std::unique_ptr<MemoryBuffer> MB =
382382
ExitOnErr(errorOrToExpected(MemoryBuffer::getFileOrSTDIN(Filename)));
383-
ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, ++NextModuleId));
383+
ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, NextModuleId++));
384384
}
385385
std::error_code EC;
386386
assert(!OutputFilename.empty());

0 commit comments

Comments
 (0)