From: Lang Hames Date: Fri, 11 Nov 2022 05:32:31 +0000 (-0800) Subject: [ORC] Capture JD by value in MachOPlatform::pushInitializersLoop. X-Git-Tag: upstream/17.0.6~27889 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f479ee7fc7a3a311cd62642de655c08321af981;p=platform%2Fupstream%2Fllvm.git [ORC] Capture JD by value in MachOPlatform::pushInitializersLoop. The lambda may run after pushInitializersLoop returns. --- diff --git a/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp index 01a4c3b..29bf864d 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