From 0fceb359ad34a1949e8f6d54ed5f11a83fd10211 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 6 Feb 2017 18:49:16 +0000 Subject: [PATCH] Try to fix build on non-Windows platforms. llvm-svn: 294213 --- lldb/source/Host/common/Host.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index ba11fa2704d8..4cd029ad6e62 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -795,14 +795,14 @@ Error Host::LaunchProcessPosixSpawn(const char *exe_path, #else if (::getcwd(current_dir, sizeof(current_dir)) == NULL) { error.SetError(errno, eErrorTypePOSIX); - error.LogIfError(log, "unable to save the current directory"); + LLDB_LOG(log, "error: {0}, unable to save the current directory", error); return error; } if (::chdir(working_dir.GetCString()) == -1) { error.SetError(errno, eErrorTypePOSIX); - error.LogIfError(log, "unable to change working directory to %s", - working_dir.GetCString()); + LLDB_LOG(log, "error: {0}, unable to change working directory to {1}", + error, working_dir); return error; } #endif @@ -876,8 +876,9 @@ Error Host::LaunchProcessPosixSpawn(const char *exe_path, #else if (::chdir(current_dir) == -1 && error.Success()) { error.SetError(errno, eErrorTypePOSIX); - error.LogIfError(log, "unable to change current directory back to %s", - current_dir); + LLDB_LOG(log, + "error: {0}, unable to change current directory back to {1}", + error, current_dir); } #endif }