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
|
/// after resolution, the function will return a success value, but the
|
||||||
/// error will be reported via reportErrors.
|
/// error will be reported via reportErrors.
|
||||||
Expected<SymbolMap> lookup(const JITDylibSearchOrder &SearchOrder,
|
Expected<SymbolMap> lookup(const JITDylibSearchOrder &SearchOrder,
|
||||||
const SymbolLookupSet &Symbols,
|
SymbolLookupSet Symbols,
|
||||||
LookupKind K = LookupKind::Static,
|
LookupKind K = LookupKind::Static,
|
||||||
SymbolState RequiredState = SymbolState::Ready,
|
SymbolState RequiredState = SymbolState::Ready,
|
||||||
RegisterDependenciesFunction RegisterDependencies =
|
RegisterDependenciesFunction RegisterDependencies =
|
||||||
|
|
|
@ -2070,7 +2070,7 @@ void ExecutionSession::lookup(
|
||||||
|
|
||||||
Expected<SymbolMap>
|
Expected<SymbolMap>
|
||||||
ExecutionSession::lookup(const JITDylibSearchOrder &SearchOrder,
|
ExecutionSession::lookup(const JITDylibSearchOrder &SearchOrder,
|
||||||
const SymbolLookupSet &Symbols, LookupKind K,
|
SymbolLookupSet Symbols, LookupKind K,
|
||||||
SymbolState RequiredState,
|
SymbolState RequiredState,
|
||||||
RegisterDependenciesFunction RegisterDependencies) {
|
RegisterDependenciesFunction RegisterDependencies) {
|
||||||
#if LLVM_ENABLE_THREADS
|
#if LLVM_ENABLE_THREADS
|
||||||
|
@ -2102,7 +2102,7 @@ ExecutionSession::lookup(const JITDylibSearchOrder &SearchOrder,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Perform the asynchronous lookup.
|
// Perform the asynchronous lookup.
|
||||||
lookup(K, SearchOrder, Symbols, RequiredState, NotifyComplete,
|
lookup(K, SearchOrder, std::move(Symbols), RequiredState, NotifyComplete,
|
||||||
RegisterDependencies);
|
RegisterDependencies);
|
||||||
|
|
||||||
#if LLVM_ENABLE_THREADS
|
#if LLVM_ENABLE_THREADS
|
||||||
|
|
|
@ -24,7 +24,7 @@ void lookupAndRecordAddrs(
|
||||||
Symbols.add(KV.first, LookupFlags);
|
Symbols.add(KV.first, LookupFlags);
|
||||||
|
|
||||||
ES.lookup(
|
ES.lookup(
|
||||||
K, SearchOrder, Symbols, SymbolState::Ready,
|
K, SearchOrder, std::move(Symbols), SymbolState::Ready,
|
||||||
[Pairs = std::move(Pairs),
|
[Pairs = std::move(Pairs),
|
||||||
OnRec = std::move(OnRecorded)](Expected<SymbolMap> Result) mutable {
|
OnRec = std::move(OnRecorded)](Expected<SymbolMap> Result) mutable {
|
||||||
if (!Result)
|
if (!Result)
|
||||||
|
@ -47,7 +47,7 @@ Error lookupAndRecordAddrs(
|
||||||
std::promise<MSVCPError> ResultP;
|
std::promise<MSVCPError> ResultP;
|
||||||
auto ResultF = ResultP.get_future();
|
auto ResultF = ResultP.get_future();
|
||||||
lookupAndRecordAddrs([&](Error Err) { ResultP.set_value(std::move(Err)); },
|
lookupAndRecordAddrs([&](Error Err) { ResultP.set_value(std::move(Err)); },
|
||||||
ES, K, SearchOrder, Pairs, LookupFlags);
|
ES, K, SearchOrder, std::move(Pairs), LookupFlags);
|
||||||
return ResultF.get();
|
return ResultF.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue