Skip to content

Commit c54d827

Browse files
[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
1 parent 83b52b5 commit c54d827

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ Error TPCDynamicLibrarySearchGenerator::tryToGenerate(
5050
assert(Result->front().size() == LookupSymbols.size() &&
5151
"Result has incorrect number of elements");
5252

53-
SymbolNameVector MissingSymbols;
5453
auto ResultI = Result->front().begin();
55-
for (auto &KV : LookupSymbols)
54+
for (auto &KV : LookupSymbols) {
5655
if (*ResultI)
5756
NewSymbols[KV.first] =
58-
JITEvaluatedSymbol(*ResultI++, JITSymbolFlags::Exported);
57+
JITEvaluatedSymbol(*ResultI, JITSymbolFlags::Exported);
58+
ResultI++;
59+
}
5960

6061
// If there were no resolved symbols bail out.
6162
if (NewSymbols.empty())

0 commit comments

Comments
 (0)