summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-10-01 04:59:10 +0000
committerLang Hames <lhames@gmail.com>2018-10-01 04:59:10 +0000
commitdeb3640d951054569351b976a2113ff58b07fd99 (patch)
tree06d3ff99e4d80f308b4138ac6c956f57dae7813d
parentb6f4d445f07b0a8ddb25f1be8d511d60cde05c37 (diff)
downloadbcm5719-llvm-deb3640d951054569351b976a2113ff58b07fd99.tar.gz
bcm5719-llvm-deb3640d951054569351b976a2113ff58b07fd99.zip
[ORC] Pass Symbols to ExecutionSession::lookup by value, potentially saving a
copy. llvm-svn: 343442
-rw-r--r--llvm/include/llvm/ExecutionEngine/Orc/Core.h2
-rw-r--r--llvm/lib/ExecutionEngine/Orc/Core.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Core.h b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
index 50c73ab0f4c..24742b10920 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Core.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Core.h
@@ -740,7 +740,7 @@ public:
/// dependenant symbols for this query (e.g. it is being made by a top level
/// client to get an address to call) then the value NoDependenciesToRegister
/// can be used.
- void lookup(const JITDylibList &JDs, const SymbolNameSet &Symbols,
+ void lookup(const JITDylibList &JDs, SymbolNameSet Symbols,
SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady,
RegisterDependenciesFunction RegisterDependencies);
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp
index 34cfe025376..b44427d9d03 100644
--- a/llvm/lib/ExecutionEngine/Orc/Core.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp
@@ -1628,7 +1628,7 @@ Expected<SymbolMap> ExecutionSession::legacyLookup(
}
void ExecutionSession::lookup(
- const JITDylibList &JDs, const SymbolNameSet &Symbols,
+ const JITDylibList &JDs, SymbolNameSet Symbols,
SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady,
RegisterDependenciesFunction RegisterDependencies) {
@@ -1640,7 +1640,7 @@ void ExecutionSession::lookup(
auto Unresolved = std::move(Symbols);
std::map<JITDylib *, MaterializationUnitList> MUsMap;
auto Q = std::make_shared<AsynchronousSymbolQuery>(
- Symbols, std::move(OnResolve), std::move(OnReady));
+ Unresolved, std::move(OnResolve), std::move(OnReady));
bool QueryIsFullyResolved = false;
bool QueryIsFullyReady = false;
bool QueryFailed = false;
OpenPOWER on IntegriCloud