Author: labath Date: Mon Feb 6 13:31:02 2017 New Revision: 294222 URL: http://llvm.org/viewvc/llvm-project?rev=294222&view=rev Log: Fix darwin build (error.PutToLog fallout)
Modified: lldb/trunk/source/Host/macosx/Host.mm Modified: lldb/trunk/source/Host/macosx/Host.mm URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=294222&r1=294221&r2=294222&view=diff ============================================================================== --- lldb/trunk/source/Host/macosx/Host.mm (original) +++ lldb/trunk/source/Host/macosx/Host.mm Mon Feb 6 13:31:02 2017 @@ -957,9 +957,7 @@ static Error getXPCAuthorization(Process if (createStatus != errAuthorizationSuccess) { error.SetError(1, eErrorTypeGeneric); error.SetErrorString("Can't create authorizationRef."); - if (log) { - error.PutToLog(log, "%s", error.AsCString()); - } + LLDB_LOG(log, "error: {0}", error); return error; } @@ -1012,9 +1010,7 @@ static Error getXPCAuthorization(Process error.SetError(2, eErrorTypeGeneric); error.SetErrorStringWithFormat( "Launching as root needs root authorization."); - if (log) { - error.PutToLog(log, "%s", error.AsCString()); - } + LLDB_LOG(log, "error: {0}", error); if (authorizationRef) { AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults); @@ -1050,9 +1046,7 @@ static Error LaunchProcessXPC(const char error.SetError(3, eErrorTypeGeneric); error.SetErrorStringWithFormat("Launching root via XPC needs to " "externalize authorization reference."); - if (log) { - error.PutToLog(log, "%s", error.AsCString()); - } + LLDB_LOG(log, "error: {0}", error); return error; } xpc_service = LaunchUsingXPCRightName; @@ -1060,9 +1054,7 @@ static Error LaunchProcessXPC(const char error.SetError(4, eErrorTypeGeneric); error.SetErrorStringWithFormat( "Launching via XPC is only currently available for root."); - if (log) { - error.PutToLog(log, "%s", error.AsCString()); - } + LLDB_LOG(log, "error: {0}", error); return error; } @@ -1146,9 +1138,7 @@ static Error LaunchProcessXPC(const char error.SetErrorStringWithFormat( "Problems with launching via XPC. Error type : %i, code : %i", errorType, errorCode); - if (log) { - error.PutToLog(log, "%s", error.AsCString()); - } + LLDB_LOG(log, "error: {0}", error); if (authorizationRef) { AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults); @@ -1160,9 +1150,7 @@ static Error LaunchProcessXPC(const char error.SetErrorStringWithFormat( "Problems with launching via XPC. XPC error : %s", xpc_dictionary_get_string(reply, XPC_ERROR_KEY_DESCRIPTION)); - if (log) { - error.PutToLog(log, "%s", error.AsCString()); - } + LLDB_LOG(log, "error: {0}", error); } return error; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits