From: Jonas Devlieghere Date: Wed, 29 Apr 2020 02:21:27 +0000 (-0700) Subject: [lldb/Host] Pass a StringRef to the FileSpec ctor X-Git-Tag: llvmorg-12-init~7507 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e693386afedab5237b42679d94ca6c72684621d;p=platform%2Fupstream%2Fllvm.git [lldb/Host] Pass a StringRef to the FileSpec ctor The FileSpec constructor takes a StringRef so there's no point in going through a C string. --- diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 8a6af38..a5705c9 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -521,7 +521,7 @@ Status Host::RunShellCommand(const Args &args, const FileSpec &working_dir, } } - FileSpec output_file_spec(output_file_path.c_str()); + FileSpec output_file_spec(output_file_path.str()); // Set up file descriptors. launch_info.AppendSuppressFileAction(STDIN_FILENO, true, false); if (output_file_spec)