From 43e71ec4c1401d44f68dce4b37e6ab807e85b0a8 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Wed, 16 May 2018 14:58:14 +0000 Subject: [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 --- llvm/tools/llvm-lto/llvm-lto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/tools/llvm-lto/llvm-lto.cpp') 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 MB = ExitOnErr(errorOrToExpected(MemoryBuffer::getFileOrSTDIN(Filename))); - ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, ++NextModuleId)); + ExitOnErr(readModuleSummaryIndex(*MB, CombinedIndex, NextModuleId++)); } std::error_code EC; assert(!OutputFilename.empty()); -- cgit v1.2.3