[llvm] r233047 - [Orc] Use std::string to capture name by value.

Lang Hames lhames at gmail.com
Mon Mar 23 21:07:02 PDT 2015


Author: lhames
Date: Mon Mar 23 23:07:01 2015
New Revision: 233047

URL: http://llvm.org/viewvc/llvm-project?rev=233047&view=rev
Log:
[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.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h?rev=233047&r1=233046&r2=233047&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h Mon Mar 23 23:07:01 2015
@@ -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 {





More information about the llvm-commits mailing list