Re: r253410 - Fix for use-after-free which caused test failure in cuda-detect.cu.

2015-11-17 Thread David Blaikie via cfe-commits
On Tue, Nov 17, 2015 at 5:35 PM, Artem Belevich wrote: > getLibDeviceFile only used once per device-side compilation in driver, so > returning the string should be OK here. > > BTW, would copy elision kick in when I use std::string Path = > getLibDeviceFile("foo"); ? > Yeah - if the caller needs

Re: r253410 - Fix for use-after-free which caused test failure in cuda-detect.cu.

2015-11-17 Thread Artem Belevich via cfe-commits
getLibDeviceFile only used once per device-side compilation in driver, so returning the string should be OK here. BTW, would copy elision kick in when I use std::string Path = getLibDeviceFile("foo"); ? --Artem On Tue, Nov 17, 2015 at 5:12 PM, David Blaikie wrote: > > > On Tue, Nov 17, 2015 at

Re: r253410 - Fix for use-after-free which caused test failure in cuda-detect.cu.

2015-11-17 Thread David Blaikie via cfe-commits
On Tue, Nov 17, 2015 at 4:37 PM, Artem Belevich via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: tra > Date: Tue Nov 17 18:37:41 2015 > New Revision: 253410 > > URL: http://llvm.org/viewvc/llvm-project?rev=253410&view=rev > Log: > Fix for use-after-free which caused test failure in c

r253410 - Fix for use-after-free which caused test failure in cuda-detect.cu.

2015-11-17 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Nov 17 18:37:41 2015 New Revision: 253410 URL: http://llvm.org/viewvc/llvm-project?rev=253410&view=rev Log: Fix for use-after-free which caused test failure in cuda-detect.cu. Return std::string itself instead StringRef to a temporary std::string. Modified: cfe/trunk/li