[Orc] Use std::string to capture name by value.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / LazyEmittingLayer.h
index 2b5db08c799241f244559c487826bb4cf979a611..fe7eafce43d2256f3970dac1ca115c28293672b7 100644 (file)
@@ -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 {