forked from OSchip/llvm-project
[ORC] Add missing std::moves, pass SymbolLookupSet by value.
Avoids some unnecessary SymbolStringPtr copies.
This commit is contained in:
parent
e8e7581fb1
commit
4bb18a89c4
|
@ -1523,7 +1523,7 @@ public:
|
|||
/// after resolution, the function will return a success value, but the
|
||||
/// error will be reported via reportErrors.
|
||||
Expected<SymbolMap> lookup(const JITDylibSearchOrder &SearchOrder,
|
||||
const SymbolLookupSet &Symbols,
|
||||
SymbolLookupSet Symbols,
|
||||
LookupKind K = LookupKind::Static,
|
||||
SymbolState RequiredState = SymbolState::Ready,
|
||||
RegisterDependenciesFunction RegisterDependencies =
|
||||
|
|
|
@ -2070,7 +2070,7 @@ void ExecutionSession::lookup(
|
|||
|
||||
Expected<SymbolMap>
|
||||
ExecutionSession::lookup(const JITDylibSearchOrder &SearchOrder,
|
||||
const SymbolLookupSet &Symbols, LookupKind K,
|
||||
SymbolLookupSet Symbols, LookupKind K,
|
||||
SymbolState RequiredState,
|
||||
RegisterDependenciesFunction RegisterDependencies) {
|
||||
#if LLVM_ENABLE_THREADS
|
||||
|
@ -2102,7 +2102,7 @@ ExecutionSession::lookup(const JITDylibSearchOrder &SearchOrder,
|
|||
#endif
|
||||
|
||||
// Perform the asynchronous lookup.
|
||||
lookup(K, SearchOrder, Symbols, RequiredState, NotifyComplete,
|
||||
lookup(K, SearchOrder, std::move(Symbols), RequiredState, NotifyComplete,
|
||||
RegisterDependencies);
|
||||
|
||||
#if LLVM_ENABLE_THREADS
|
||||
|
|
|
@ -24,7 +24,7 @@ void lookupAndRecordAddrs(
|
|||
Symbols.add(KV.first, LookupFlags);
|
||||
|
||||
ES.lookup(
|
||||
K, SearchOrder, Symbols, SymbolState::Ready,
|
||||
K, SearchOrder, std::move(Symbols), SymbolState::Ready,
|
||||
[Pairs = std::move(Pairs),
|
||||
OnRec = std::move(OnRecorded)](Expected<SymbolMap> Result) mutable {
|
||||
if (!Result)
|
||||
|
@ -47,7 +47,7 @@ Error lookupAndRecordAddrs(
|
|||
std::promise<MSVCPError> ResultP;
|
||||
auto ResultF = ResultP.get_future();
|
||||
lookupAndRecordAddrs([&](Error Err) { ResultP.set_value(std::move(Err)); },
|
||||
ES, K, SearchOrder, Pairs, LookupFlags);
|
||||
ES, K, SearchOrder, std::move(Pairs), LookupFlags);
|
||||
return ResultF.get();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue