From 736b9fd95c222e503a7d4be379cbb38292c6ea87 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 24 Mar 2015 04:07:01 +0000 Subject: [PATCH] [Orc] Use std::string to capture name by value. This just updates the code to reflect the comment, but this bug actually hit the out-of-tree lazy demo. I'm working on a patch to add the lazy-demo's functionality to lli so that we can test this in-tree soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233047 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h index 2b5db08c799..fe7eafce43d 100644 --- a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h +++ b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h @@ -49,7 +49,7 @@ private: // Create a std::string version of Name to capture here - the argument // (a StringRef) may go away before the lambda is executed. // FIXME: Use capture-init when we move to C++14. - auto PName = Name; + std::string PName = Name; JITSymbolFlags Flags = JITSymbolBase::flagsFromGlobalValue(*GV); auto GetAddress = [this, ExportedSymbolsOnly, PName, &B]() -> TargetAddress { -- 2.34.1