[PATCH] D91707: [Orc] Two small fixes in TPCDynamicLibrarySearchGenerator
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 06:23:06 PST 2020
sgraenitz created this revision.
sgraenitz added a reviewer: lhames.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
sgraenitz requested review of this revision.
Two details we missed in D90132 <https://reviews.llvm.org/D90132>:
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91707
Files:
llvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp
Index: llvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp
===================================================================
--- llvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp
+++ llvm/lib/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.cpp
@@ -50,12 +50,13 @@
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())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91707.306089.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201118/e0e63064/attachment.bin>
More information about the llvm-commits
mailing list