diff options
Diffstat (limited to 'lld/wasm/Writer.cpp')
-rw-r--r-- | lld/wasm/Writer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index dc2210b1146..b5eafe5abdd 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -657,12 +657,11 @@ void Writer::calculateImports() { continue; DEBUG(dbgs() << "import: " << Sym->getName() << "\n"); - Sym->setOutputIndex(ImportedSymbols.size()); ImportedSymbols.emplace_back(Sym); if (isa<FunctionSymbol>(Sym)) - ++NumImportedFunctions; + Sym->setOutputIndex(NumImportedFunctions++); else - ++NumImportedGlobals; + Sym->setOutputIndex(NumImportedGlobals++); } } |