[llvm] r332476 - [ThinLTO] Make llvm-lto module ID numbering consistent with linkers
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 07:58:14 PDT 2018
Author: tejohnson
Date: Wed May 16 07:58:14 2018
New Revision: 332476
URL: http://llvm.org/viewvc/llvm-project?rev=332476&view=rev
Log:
[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.
Modified:
llvm/trunk/tools/llvm-lto/llvm-lto.cpp
Modified: llvm/trunk/tools/llvm-lto/llvm-lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-lto/llvm-lto.cpp?rev=332476&r1=332475&r2=332476&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-lto/llvm-lto.cpp (original)
+++ llvm/trunk/tools/llvm-lto/llvm-lto.cpp Wed May 16 07:58:14 2018
@@ -380,7 +380,7 @@ static void createCombinedModuleSummaryI
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());
More information about the llvm-commits
mailing list