diff options
author | Lang Hames <lhames@gmail.com> | 2018-02-14 22:12:56 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-02-14 22:12:56 +0000 |
commit | e833fe8ec31e1bc51d59c84af158ac44ed423153 (patch) | |
tree | ea435346f88da72eacfc97b0560dc294ccd2082e /llvm/lib/ExecutionEngine/Orc/Legacy.cpp | |
parent | 675752166de3746ebe0f8198e9c72989a4dccbc3 (diff) | |
download | bcm5719-llvm-e833fe8ec31e1bc51d59c84af158ac44ed423153.tar.gz bcm5719-llvm-e833fe8ec31e1bc51d59c84af158ac44ed423153.zip |
[ORC] Switch to shared_ptr ownership for AsynchronousSymbolQueries.
Queries need to stay alive until each owner has set the values they are
responsible for.
llvm-svn: 325179
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/Legacy.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/Legacy.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Legacy.cpp b/llvm/lib/ExecutionEngine/Orc/Legacy.cpp index 240e0f8ba1d..a2413703f13 100644 --- a/llvm/lib/ExecutionEngine/Orc/Legacy.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Legacy.cpp @@ -41,9 +41,10 @@ JITSymbolResolverAdapter::lookup(const LookupSet &Symbols) { "legacy resolver received on-ready error:\n"); }; - AsynchronousSymbolQuery Query(InternedSymbols, OnResolve, OnReady); + auto Query = std::make_shared<AsynchronousSymbolQuery>(InternedSymbols, + OnResolve, OnReady); - auto UnresolvedSymbols = R.lookup(Query, InternedSymbols); + auto UnresolvedSymbols = R.lookup(std::move(Query), InternedSymbols); if (!UnresolvedSymbols.empty()) { std::string ErrorMsg = "Unresolved symbols: "; |