[llvm] 5f479ee - [ORC] Capture JD by value in MachOPlatform::pushInitializersLoop.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 16:01:31 PST 2022
Author: Lang Hames
Date: 2022-11-11T16:01:25-08:00
New Revision: 5f479ee7fc7a3a311cd62642de655c08321af981
URL: https://github.com/llvm/llvm-project/commit/5f479ee7fc7a3a311cd62642de655c08321af981
DIFF: https://github.com/llvm/llvm-project/commit/5f479ee7fc7a3a311cd62642de655c08321af981.diff
LOG: [ORC] Capture JD by value in MachOPlatform::pushInitializersLoop.
The lambda may run after pushInitializersLoop returns.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
index 01a4c3b9837d8..29bf864dcd951 100644
--- a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
@@ -479,7 +479,7 @@ void MachOPlatform::pushInitializersLoop(
// Otherwise issue a lookup and re-run this phase when it completes.
lookupInitSymbolsAsync(
- [this, SendResult = std::move(SendResult), &JD](Error Err) mutable {
+ [this, SendResult = std::move(SendResult), JD](Error Err) mutable {
if (Err)
SendResult(std::move(Err));
else
More information about the llvm-commits
mailing list