diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp index 1dfa90acb76..f82f5ecfed5 100644 --- a/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp @@ -44,27 +44,13 @@ public: return Result; } - Expected<LookupFlagsResult> lookupFlags(const LookupSet &Symbols) { - auto &ES = MR.getTargetJITDylib().getExecutionSession(); - - SymbolNameSet InternedSymbols; - - for (auto &S : Symbols) - InternedSymbols.insert(ES.getSymbolStringPool().intern(S)); - - SymbolFlagsMap InternedResult; - MR.getTargetJITDylib().withSearchOrderDo([&](const JITDylibList &JDs) { - // An empty search order is pathalogical, but allowed. - if (JDs.empty()) - return; - - assert(JDs.front() && "VSOList entry can not be null"); - InternedResult = JDs.front()->lookupFlags(InternedSymbols); - }); + Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) { + LookupSet Result; - LookupFlagsResult Result; - for (auto &KV : InternedResult) - Result[*KV.first] = std::move(KV.second); + for (auto &KV : MR.getSymbols()) { + if (Symbols.count(*KV.first)) + Result.insert(*KV.first); + } return Result; } |