[Orc] Two small fixes in TPCDynamicLibrarySearchGenerator

There is one result per lookup symbol, so we have to advance the result iterator no matter whether it's NULL or not.
MissingSymbols variable is unused.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D91707
This commit is contained in:
Stefan Gränitz 2020-12-08 10:56:50 +01:00
parent 83b52b5ba2
commit c54d827fdb
1 changed files with 4 additions and 3 deletions

View File

@ -50,12 +50,13 @@ Error TPCDynamicLibrarySearchGenerator::tryToGenerate(
assert(Result->front().size() == LookupSymbols.size() &&
"Result has incorrect number of elements");
SymbolNameVector MissingSymbols;
auto ResultI = Result->front().begin();
for (auto &KV : LookupSymbols)
for (auto &KV : LookupSymbols) {
if (*ResultI)
NewSymbols[KV.first] =
JITEvaluatedSymbol(*ResultI++, JITSymbolFlags::Exported);
JITEvaluatedSymbol(*ResultI, JITSymbolFlags::Exported);
ResultI++;
}
// If there were no resolved symbols bail out.
if (NewSymbols.empty())