From 6e693386afedab5237b42679d94ca6c72684621d Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 28 Apr 2020 19:21:27 -0700 Subject: [PATCH] [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. --- lldb/source/Host/common/Host.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.7.4